Prerequisites

  1. Create a Middleware account
  2. Keep logging into your account
  3. Access to Kubernetes cluster and Kubernetes client (ie. : kubectl)

Use our one-step easy K8s installation

Use following command to install agent on Kubernetes

Shell
MW_API_KEY=xxxxxxxxxxxxxxxxxx TARGET=https://uid.middleware.io:443 bash -c "$(curl -L https://install.middleware.io/scripts/yaml-install.sh)"

This script will install a Kubernetes daemonset into your k8s cluster.

This agent is mainly created to monitor the data of your Kubernetes infrastucture.

Replace the MW_API_KEY value with your API key or directly copy the full command with the API key from the installation menu.
Replace “uid” with the text in the URL (ex URL is “s05zpimz.middleware.io” , here s05zpimz is uid.)
You must not run more than one MW Agent per cluster. Running multiple Agents may result in unexpected behavior.

Verify Status for K8s Infrastructure Agent

Run this command to check the status of main daemonset component, which will be collecting data from your cluster

kubectl get daemonset/mw-kube-agent -n mw-agent-ns

Expected Output:

NameDesiredCurrentReadyUp-to-dateAvailable Non selectorAge
mw-kube-agent77777<none>111s

If you have “N” number of k8s nodes, You should see “N” ready pods.

Uninstall the Middleware agent

To uninstall the middleware agent, please use the following command.

Shell
bash -c "$(curl -L https://install.middleware.io/scripts/yaml-uninstall.sh)"