Install with Kubernetes

If you want APImetrics to monitor API calls as a Kubernetes sidecar, use these steps to add the APImetrics adaptor into your application.

Our Observability Adapter for Kubernetes applications allows you to monitor your live API traffic from Kubernetes, without configuring API calls manually in the APImetrics platform. By deploying this adapter, APImetrics can read API calls that are coming from Kubernetes, and automatically build your API Inventory. Once integrated, you can compare your live API traffic against your OAS spec, and set up synthetic endpoint monitoring automatically.

Add the APImetrics Adaptor to the YAML File

Open your existing deployment Kubernetes YAML file for your application. Find the section where you define the containers for your pods.

πŸ“˜

Tip: You will need to create a new API Key for APImetrics by following the tutorial here and choosing Ingress as your Access Level.

Add the following snippet of code inside the containers section:

- name: darkspark-sidecar
  image: bycontxt/darkspark-sidecar
  imagePullPolicy: IfNotPresent
  resources:
    limits:
      cpu: 1000m
      memory: 256Mi
    requests:
      cpu: 1000m
      memory: 256Mi
  env:
    - name: DARKSPARK_API_KEY
      value: <API KEY HERE>

Replace with your newly generated API key. Remember best practices for security - your API Key should be sourced from your secrets or configmaps and not pasted directly into your YAML file.

Now, when you run your Kubernetes application, your API calls will populate the Inventory.


What’s Next

Add these new API calls to your Schedules & Workflows: