Kubernetes Agent
Capture and act on metrics and logs from your Kubernetes clusters with simple to deploy daemonsets using a bash script or helm deploy. The Kubernetes agent is supported on all cloud, bare metal and on-prem environments.
This guide is a quick start for Kubernetes. See the Kubernetes documentation for troubleshooting and advanced configurations.
Installing the Agent
1 Prerequisites
In order to use the Middleware Kubernetes agent you need to ensure your Kubernetes is on version 21.0.0
or higher, that the user installing has kubectl
access using version >= v1.17.0
, and that the host has bash, curl and wget installed.
2 Deploy the agent
Select the desired approach to deploying the agent below. The required MW_API_KEY
and MW_TARGET
will be pre-filled if you've logged into our docs, and are accessible in the Platform's Installation Pages.
MW_API_KEY="<MW_API_KEY>" MW_TARGET=https://<MW_UID>.middleware.io:443 bash -c "$(curl -L https://install.middleware.io/scripts/mw-kube-agent-install-v2.sh)"
Download the Infra Agent batch file here. Open PowerShell, change the working directory to the location of the download, and execute the following commands:
set MW_API_KEY="<MW_API_KEY>" set MW_TARGET=https://<MW_UID>.middleware.io:443 mw-kube-agent-install-windows.bat
Run the below commands to clone the the helm repo and deploy the agent using helm install
helm repo add middleware-labs https://helm.middleware.io helm install mw-agent middleware-labs/mw-kube-agent-v2 --set mw.apiKey=<MW_API_KEY> --set mw.target=https://<MW_UID>.middleware.io:443
3 Verify Installation
Verify the status of the Infra Agent with the following command:
kubectl get daemonset/mw-kube-agent -n mw-agent-ns
3 Infrastructure Dashboard
Middleware takes a few minutes to index new data sets. Once all attributes have been indexed all data will be accessible in the platform on the Infrastructure page, in the Dashboard Builder, and when building Alerts.
4 Advanced Options
Middleware's Kubernetes agent has many other deployment options like using MS Powershell, applying custom tags across your cluster, and using a secret from a secret manager.
To see the complete capabilities of the agent visit the Kubernetes documentation.