Kubernetes Labels and Annotations
Overview
The CloudZero agent for Kubernetes requires you to allowlist the labels and annotations that you would like to use in the CloudZero platform.
Advanced Configuration
This is an advanced configuration setting. Refer to the Advanced Configuration section of our documentation to get started.
CloudZero limits you to 300 Kubernetes Labels & Annotations in the platform. Enabling any more than 300 will result in extra Labels and Annotations being dropped.
Labels
- Add the following to your values.yaml file and re-deploy.
insightsController:
labels:
# -- This value MUST be set to a list of regular expressions which will be used to gather labels from pods, deployments, statefulsets, daemonsets, cronjobs, jobs, nodes, and namespaces
patterns:
# By default, only the app.kubernetes.io/component label is captured. Use the examples below to add others.
- 'app.kubernetes.io/component'
# - '^foo' -- Match all labels whose key starts with "foo"
# - 'bar$' -- Match all labels whose key ends with "bar"
# -- Labels are gathered from pods and namespaces by default.
# -- Other supported resource types are: deployments, statefulsets, nodes, jobs, cronjobs, daemonsets
resources:
pods: true
namespaces: true
- Re-deploy the agent with your updated values file.
helm upgrade --install cloudzero \
--repo https://cloudzero.github.io/cloudzero-charts cloudzero-agent \
--namespace cloudzero --create-namespace -f values.yaml
Annotations
- Add the following to your values.yaml file and re-deploy.
insightsController:
annotations:
# -- By default, annotations are not captured. Set enabled:true to capture them.
enabled: true
# -- This value MUST be set to a list of regular expressions which will be used to gather annotations from pods, deployments, statefulsets, daemonsets, cronjobs, jobs, nodes, and namespaces
patterns:
- '.*' # -- Capture all annotations
# -- Other supported resource types are: deployments, statefulsets, nodes, jobs, cronjobs, daemonsets
resources:
pods: true
namespaces: true
- Re-deploy the agent with your updated values file.
helm upgrade --install cloudzero \
--repo https://cloudzero.github.io/cloudzero-charts cloudzero-agent \
--namespace cloudzero --create-namespace -f values.yaml
Updated 4 days ago