Kubernetes
Installing on Kubernetes

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 installation

To install a Middleware agent on a host, copy the Installation command and paste it into the command prompt. Your command will look like the following example, and it will include your API key.

You can use one-step auto instrumentation as follow

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

This script will install our all-in-one helm chart into your k8s cluster.

Once the script is executed, you will be given instructions to open our ‘Middleware Vision UI’.

When you open the Vision UI (using port-forward), you will see all the applications running in your cluster along with their detected programming language

Select all the applications that you want to monitor and press ‘Save Changes’, and you will see their distributed traces in the Middleware dashboard.

OR 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 the status for K8s Auto-instrument Agent

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

Shell
kubectl get daemonset/vision-data-collection -n mw-vision

Expected Output:

NameDesiredCurrentReadyUp to DateAvailable Node selectorAge
Vision-data-collection77777<none>111s

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

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

Shell
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)"