(DEPRECATED) Monitor an Azure Container Service Kubernetes cluster using Sysdig

Warning

The Azure Container Service (ACS) is being deprecated. No new features or functionality are being added to ACS. All of the APIs, portal experience, CLI commands and documentation are marked as deprecated.

In 2017, we introduced Azure Kubernetes Service (AKS) for simplifying Kubernetes management, deployment, and operations. If you use the Kubernetes orchestrator, please migrate to AKS by January 31, 2020. To get started, see migrate to Azure Kubernetes Service.

For more information, see the Azure Container Service deprecation announcement on Azure.com.

Prerequisites

This walkthrough assumes that you have created a Kubernetes cluster using Azure Container Service.

It also assumes that you have the azure cli and kubectl tools installed.

You can test if you have the az tool installed by running:

az --version

If you don't have the az tool installed, there are instructions here.

You can test if you have the kubectl tool installed by running:

kubectl version

If you don't have kubectl installed, you can run:

az acs kubernetes install-cli

Sysdig

Sysdig is an external monitoring as a service company which can monitor containers in your Kubernetes cluster running in Azure. Using Sysdig requires an active Sysdig account. You can sign up for an account on their site.

Once you're logged in to the Sysdig cloud website, click on your user name, and on the page you should see your "Access Key."

Sysdig API key

Installing the Sysdig agents to Kubernetes

To monitor your containers, Sysdig runs a process on each machine using a Kubernetes DaemonSet. DaemonSets are Kubernetes API objects that run a single instance of a container per machine. They're perfect for installing tools like the Sysdig's monitoring agent.

To install the Sysdig daemonset, you should first download the template from sysdig. Save that file as sysdig-daemonset.yaml.

On Linux and OS X you can run:

curl -O https://raw.githubusercontent.com/draios/sysdig-cloud-scripts/master/agent_deploy/kubernetes/sysdig-daemonset.yaml

In PowerShell:

Invoke-WebRequest -Uri https://raw.githubusercontent.com/draios/sysdig-cloud-scripts/master/agent_deploy/kubernetes/sysdig-daemonset.yaml | Select-Object -ExpandProperty Content > sysdig-daemonset.yaml

Next edit that file to insert your Access Key, that you obtained from your Sysdig account.

Finally, create the DaemonSet:

kubectl create -f sysdig-daemonset.yaml

View your monitoring

Once installed and running, the agents should pump data back to Sysdig. Go back to the sysdig dashboard and you should see information about your containers.

You can also install Kubernetes-specific dashboards via the new dashboard wizard.