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.

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: