KloudMate Agents
Kubernetes Agent
11 min
this document will guide you to instrument kubernetes using the kloudmate agent via daemonset & deployment the commands below are for reference only log in to kloudmate and copy your account specific command to install the agent step 1 getting started use the kloudmate kubernetes agent to monitor your kubernetes infrastructure and optionally your applications (apm) without any code changes pre requisites kubernetes version 1 24 or above helm version 3 0 or above cert manager version v1 18 2 or above step 2 install cert manager skip this step if you already have cert manager installed helm install \\ cert manager oci //quay io/jetstack/charts/cert manager \\ \ namespace cert manager \\ \ create namespace \\ \ set crds enabled=true step 3 enter cluster details provide a name for your kubernetes cluster this name will be used to identify the cluster inside kloudmate step 4 set preferences configure how kloudmate should collect data from this cluster collect container logs toggle on/off based on whether you want to ingest container logs from the cluster enable auto instrumentation for apm turn this on to automatically instrument supported application runtimes (python, node js, java, net, go) for apm monitored namespaces enter a comma‑separated list of namespaces to monitor for events and apm (for example, redis, kafka, prod app ) leave this field empty to monitor all namespaces (system namespaces are excluded by default) step 5 run the installation command the ui will generate a helm command based on your inputs run this command in your terminal to install the kloudmate agent in your kubernetes cluster helm repo add kloudmate https //charts kloudmate com helm repo update helm install kloudmate release kloudmate/km kube agent \\ \ namespace km agent create namespace \\ \ set api key="\<your api key>" \\ \ set collector endpoint="https //otel kloudmate dev 4318" \\ \ set clustername="test" \\ \ set monitorednamespaces="default, prod, dev" \\ \ set featuresenabled logs="true" \\ \ set featuresenabled apm="false" installing the agent on tainted nodes if your kubernetes cluster has nodes with taints, the agent pods must be assigned matching tolerations to be scheduled successfully by default, the agent does not include any tolerations, but you can configure them during installation by using helm parameters example helm installation command with tolerations helm install kloudmate release kloudmate/km kube agent namespace km agent create namespace \\ \ set api key="\<your api key>" set collector endpoint="https //otel kloudmate com 4318" \\ \ set clustername="\<your cluster name>" \\ \ set "monitorednamespaces={monitored ns}" \\ \ set tolerations\[0] key="env" set tolerations\[0] operator="equal" set tolerations\[0] value="uat" set tolerations\[0] effect="noschedule" \\ \ set tolerations\[1] key="env" set tolerations\[1] operator="equal" set tolerations\[1] value="sb uat node" set tolerations\[1] effect="noschedule" \\ in this example, two separate tolerations are defined to match the taints configured on the cluster nodes, enabling the agent pods to be scheduled on all required nodes you can add any number of tolerations by incrementing the index ( tolerations\[0] , tolerations\[1] , etc ) ensure that the key, operator, value, and effect match the taints applied to your nodes if your cluster does not have taints, these parameters can be omitted the agent pods will then be scheduled on untainted nodes by default apm setup instructions there are two ways to enable application performance monitoring (apm) in your cluster 1\ enable apm via dashboard after installing the agent, open the apm configuration tab in the dashboard use the toggle button to enable or disable apm once enabled, the agent will automatically detect all running microservices and identify their respective programming languages after turning on apm, wait a few minutes to begin receiving metrics, then verify them on the dashboard 2\ enable apm via the patch method in some cases, the agent may not automatically detect certain applications in such scenarios, use deployment annotations to enable apm for your applications steps 1\ identify each application that requires apm 2\ edit or patch the corresponding deployments to include the required annotation for its language java annotations instrumentation opentelemetry io/inject java km agent/km agent instrumentation crd python annotations instrumentation opentelemetry io/inject python km agent/km agent instrumentation crd node js annotations instrumentation opentelemetry io/inject nodejs km agent/km agent instrumentation crd net annotations instrumentation opentelemetry io/inject dotnet km agent/km agent instrumentation crd 3\ restart the deployments after adding the annotations