komodor-agent
by Komodor
Watches and sends kubernetes resource-related events
About this chart
komodor-agent
Watches and sends kubernetes resource-related events
TL;DR;
helm repo add komodorio https://helm-charts.komodor.io
helm repo update
helm upgrade --install komodor-agent komodorio/komodor-agent \
--set apiKey=<YOUR_API_KEY_HERE> \
--set clusterName=<CLUSTER_NAME> \
--wait \
--timeout=90s
In case of error try contact us for assistance via the Komodor Help Center at: https://help.komodor.com Or run:
- Logs of komodor-agent
kubectl logs --tail=10 deployment/komodor-agent
- Helm status
helm status komodor-agent
- Reinstall
helm uninstall komodor-agent
Introduction
This chart bootstraps a Kubernetes Resources/Event Watcher deployment on a Kubernetes cluster using the Helm package manager.
Supported architectures
- :white_check_mark: linux/amd64
- :white_check_mark: linux/arm64
Prerequisites
- Kubernetes 1.19+ (older versions not officially supported)
- Helm 2/3
Memory Planning (Recommended)
Before installing the Komodor agent, we recommend running our memory checker utility to analyze your cluster's resource requirements and determine appropriate memory limits. This helps prevent out-of-memory issues and ensures optimal performance.
Quick Memory Analysis
# Clone or download and apply the memory planning utility resources - They will be installed in the 'komodor-precheck' namespace
kubectl apply -f https://raw.githubusercontent.com/komodorio/helm-charts/master/charts/komodor-agent/utilities/memory-planning/01-namespace.yaml
kubectl apply -f https://raw.githubusercontent.com/komodorio/helm-charts/master/charts/komodor-agent/utilities/memory-planning/02-configmap.yaml
kubectl apply -f https://raw.githubusercontent.com/komodorio/helm-charts/master/charts/komodor-agent/utilities/memory-planning/03-serviceaccount.yaml
kubectl apply -f https://raw.githubusercontent.com/komodorio/helm-charts/master/charts/komodor-agent/utilities/memory-planning/04-clusterrole.yaml
kubectl apply -f https://raw.githubusercontent.com/komodorio/helm-charts/master/charts/komodor-agent/utilities/memory-planning/05-clusterrolebinding.yaml
kubectl apply -f https://raw.githubusercontent.com/komodorio/helm-charts/master/charts/komodor-agent/utilities/memory-planning/06-job.yaml
# Monitor the analysis
kubectl logs -f job/komodor-memory-checker -n komodor-precheck
# View results and recommendations
kubectl logs job/komodor-memory-checker -n komodor-precheck | grep -A 10 "MEMORY RECOMMENDATIONS"
# Clean up after analysis
kubectl delete namespace komodor-precheck
Using the Results
Apply the memory recommendations to your Helm installation:
helm upgrade --install komodor-agent komodorio/komodor-agent \
--set apiKey=<YOUR_API_KEY_HERE> \
--set clusterName=<CLUSTER_NAME> \
--set components.komodorAgent.watcher.resources.requests.memory=<RECOMMENDED_REQUEST> \
--set components.komodorAgent.watcher.resources.limits.memory=<RECOMMENDED_LIMIT>
For detailed instructions and configuration options, see the Memory Planning Utility Documentation.
Installing the Chart
To install the chart with the release name komodor-agent:
helm upgrade --install komodor-agent komodorio/komodor-agent \
--set apiKey=<YOUR_API_KEY_HERE> \
--set clusterName=<CLUSTER_NAME>
The command deploys the komodor-agent on the Kubernetes cluster with default configuration. The configuration section lists the parameters that can be configured during installation.
Tip: List all releases using
helm list
Install profiles
profile installs a preset that turns off the capabilities the preset does not need:
helm upgrade --install komodor-agent komodorio/komodor-agent \
--set apiKey=<YOUR_API_KEY_HERE> \
--set clusterName=<CLUSTER_NAME> \
--set profile=cost
| Profile | What it does |
|---|---|
"" (default) | Nothing. Every value is exactly as documented below. |
cost | A read-only, cost-only agent. Keeps metrics collection, the admission controller and HPA right-sizing. Turns off actions, helm, RBAC management, pod logs, the node enricher, resource-info, agent telemetry and the OpenTelemetry collector, the WebSocket tunnel, the kubectl proxy, and the Klaudia integration sync, and narrows the agent's cluster read permissions to the resource kinds the cost flows actually read. |
Two things to know before using one:
- A profile takes precedence over
--setfor the keys it writes. This is the one way it differs from passing a values file. A profile only ever turns capabilities off, so you can still shrink an install further —--set profile=cost --set capabilities.metrics=falseworks — but you cannot turn one of the profile's own switches back on. Drop the profile and set the individual keys if you need that. allowedResources.customReadAPIGroupsis left alone, so add the API groups of any CRDs you want the agent to read alongside the profile, for example--set allowedResources.customReadAPIGroups={sparkoperator.k8s.io}.- A profile never touches resource requests or limits. Sizing stays yours — see
Memory Planning above. A cost-profile watcher runs far fewer
informers than a full agent, so the default
8Giwatcher limit is usually much larger than it needs, and lowering it is what brings the agent's own memory throttle into reach:--set components.komodorAgent.watcher.resources.limits.memory=2Gi.
Api Key
The Komodor kubernetes api key can be provided in the helm upgrade command, in the values.yaml file or can be taken from an existing kubernetes secret resource.
When using an existing kubernetes secret resource, specify the secret name in apiKeySecret and store the api key under the name 'apiKey'.
Uninstalling the Chart
To uninstall/delete the komodor-agent deployment:
Helm 3:
helm uninstall komodor-agent
Helm 2:
helm delete --purge komodor-agent
The command removes all the Kubernetes components associated with the chart and deletes the release.
Telemetry & Observability
The Komodor agent ships an OpenTelemetry Collector sidecar that handles all traces, metrics, and logs produced by the agent components. It also exposes agent health-check metrics on a local Prometheus endpoint (:9090) that you can scrape with your own monitoring stack.
For a full description of the data pipelines, exposed ports, health-check metrics, and the split between what is sent to Komodor and what is available to you locally, see the OpenTelemetry Collector README.
Relevant values:
| Key | Default | Description |
|---|---|---|
capabilities.telemetry.enabled | true | Master switch — disabling this stops all telemetry collection |
capabilities.telemetry.deployOtelCollector | true | Deploy the collector sidecar |
components.komodorDaemon.opentelemetry.otelInit.enabled | true | Fetch collector configuration remotely from the Komodor backend |
Values
| Key | Type | Default | Description |
|---|---|---|---|
| site | string | "us" | Komodor site, allowed values: "us", "eu" |
| apiKey | guid | nil | (required) To be obtained from komodor app during onboarding |
| apiKeySecret | string | nil | Secret name containing Komodor agent api key |
| publicApiKey | guid | nil | Komodor public API key. Required when features that depend on it are enabled (currently capabilities.klaudiaIntegrationSync). |
| publicApiKeySecret | string | nil | Existing Kubernetes secret containing the public API key |
| publicApiKeySecretKey | string | nil | Key inside publicApiKeySecret (defaults to publicApiKey) |
| createNamespace | bool | true | Creates the namespace |
| tags | dict | {} | Tags the agent in order to identify it based on key:value properties separated by semicolon (;) example: --set tags.env=staging,tags.team=payments --- Can also be set in the values under tags as a dictionary of key:value strings |
| clusterName | string | nil | (required) Name to be displayed in the Komodor web application |
| createRbac | bool | true | Creates the necessary RBAC resources for the agent - use with caution! |
| profile | string | "" | Install a preset that turns off the capabilities the preset does not need. Allowed values: "" (default, nothing is changed) and cost (a cost-only agent). Values a profile writes take precedence over --set, so use --set profile=cost to shrink an install and leave the individual keys alone unless you are turning something further off. |
| global | object | See sub-values | Global defaults applied across the chart. |
| global.podSecurityContext | object | {} | Set a pod-level securityContext applied to all agent pods unless a component-specific podSecurityContext is defined. Supports pod-only fields: fsGroup, runAsUser, runAsGroup, runAsNonRoot, supplementalGroups, sysctls, seccompProfile. (use with caution) |
| global.securityContext | object | {} | Set a container-level securityContext applied to all containers unless a container-specific securityContext is defined. Supports container fields: allowPrivilegeEscalation, capabilities, privileged, readOnlyRootFilesystem, runAsUser, runAsGroup, runAsNonRoot, seccompProfile. (use with caution) |
| telegrafImageVersion | string | "v2.0.93-alpine" | Telegraf version to be used |
| telegrafWindowsImageVersion | string | "v2.0.93" | Telegraf version to be used for windows |
| admissionControllerVersion | string | "0.1.82" | Admission controller version to be used |
| serviceAccount | object | See sub-values | Configure service account for the agent |
| serviceAccount.create | bool | true | Creates a service account for the agent |
| serviceAccount.name | string | nil | Name of the service account, Required if serviceAccount.create is false |
| serviceAccount.annotations | object | {} | Add annotations to the service account |
| proxy.enabled | bool | false | Enable proxy for the agent |
| proxy.komodorOnly | bool | true | Configure proxy to be applied only on communication to Komodor servers (comms. to K8S API remains without proxy) |
| proxy.http | string | nil | Configure Proxy setting (HTTP_PROXY) eg. http://proxy.com:8080 |
| proxy.https | string | nil | Configure Proxy setting (HTTPS_PROXY) eg. https://proxy.com:8080 |
| proxy.no_proxy | string | nil | Specify specific domains to ignore proxy for. eg. komodor.com,google.com |
| proxy.no_proxy_local_addresses | bool | false | When true, prepends standard Kubernetes-internal addresses (localhost, 127.0.0.1, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, .cluster.local, .svc) to NO_PROXY so that in-cluster traffic (e.g. Kubernetes API server) bypasses the proxy. |
| customCa | object | See sub-values | Configure custom CA for the agent (Not supported for windows) |
| customCa.enabled | bool | false | Enable custom CA certificate for the agent |
| customCa.secretName | string | nil | Name of the secret containing the CA |
| customCa.resources | dict | {"limits":{"cpu":"10m","memory":"100Mi"},"requests":{"cpu":"1m","memory":"10Mi"}} | Set custom resources to the custom CA container |
| customCa.securityContext | dict | {"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000} | Set container-level securityContext for the custom CA init container. Supports container-only fields: allowPrivilegeEscalation, capabilities, privileged, readOnlyRootFilesystem, runAsUser, runAsGroup, runAsNonRoot, seccompProfile. (use with caution) |
| imageRepo | string | "public.ecr.aws/komodor-public" | Override the komodor agent image repository. |
| pullPolicy | string | "IfNotPresent" | Default Image pull policy for the komodor agent image acceptable values <ifNotPresent\Always\Never>. |
| imagePullSecret | string | nil | Set the image pull secret for the komodor agent |
| capabilities | object | See sub-values | Configure the agent capabilities |
| capabilities.metrics | bool | true | Fetch workload metrics and send them to komodor backend |
| capabilities.nodeEnricher | bool | true | Enable node enricher capabilities by the komodor agent |
| capabilities.actions | bool | true | Allow users to perform actions on the cluster, granular access control is defined in the application |
| capabilities.crActions | bool | true | Allow komodor service account to edit and delete custom resources in the cluster |
| capabilities.cost | object | See sub-values | Configure the agent cost capabilities |
| capabilities.cost.hpa | bool | true | Grant the k8s-watcher patch/update on HorizontalPodAutoscalers and KEDA ScaledObjects/ScaledJobs, independently of capabilities.actions. Required for HPA right-sizing when actions=false. |
| capabilities.resourceInfo | object | See sub-values | Configure the agent resource-info collection subsystem |
| capabilities.resourceInfo.enabled | bool | true | Enable the in-watcher resource-info collector. Komodor's remote config enables this for every agent, so the chart default matches what actually runs; profile=cost turns it off and enforces that with an env var, which remote config cannot override. |
| capabilities.helm | object | {"enabled":true,"readonly":false} | Enable helm capabilities by the komodor agent |
| capabilities.helm.enabled | bool | true | Enable helm capabilities by the komodor agent |
| capabilities.helm.readonly | bool | false | Allow komodor to read helm resources only (remove create/update/delete permissions from secrets) |
| capabilities.rbac | bool | true | Allow komodor to create and manage serviceaccounts, roles and bindings in clust |
Deploy komodor-agent with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has komodor-agent on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartkomodor-agent is pinned at v2.18.4-RC4 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply