Sysdig Install: Google Container Engine (GKE)

Sysdig Monitor is the first and only monitoring, alerting, and troubleshooting solution designed from the ground up to provide unprecedented visibility into containerized infrastructures.

Sysdig Monitor comes with built-in, first class support for Google Container Engine (GKE). In order to start monitoring your Kubernetes cluster on GKE, there are two steps you need to take:

  1. Sign up for a free trial at https://www.sysdig.com/gke-monitoring
  2. Install the Sysdig agent container on each Kubernetes Node in your cluster

There are multiple methods for accomplishing this installation, listed below in order of simplicity and automation.

GKE Wizard (Preferred Method)

Of the three base images currently available for host creation, only 'container_vm' and 'ubuntu' are supported for use with the Sysdig agent. The 'cos' image does not contain the required dependencies to allow the agent to be installed.  

Note: The compatible 'container_vm' image is being deprecated as of September 2017. Google  recommends using the 'ubuntu' image on GKE with Sysdig:  https://cloud.google.com/container-engine/docs/node-images#sysdig_support

 

To monitor a GKE cluster with Sysdig Monitor, follow these steps:

First, log into your GKE account and set up your container cluster:

1_Create_Cluster.jpg

 

The current default image `cos` is not compatible with Sysdig due to the lack of kernel files needed to build a required kernel module.  Upgrade your cluster by selecting the `ubuntu` image:

GKE_Cluster_Image_Selection.jpg 

 

You are now ready to deploy Sysdig agent by following the installation wizard available in Sysdig Monitor. Please go to Sysdig Monitor GKE Install Wizard to sign in with your Google account and authorize Sysdig Monitor:

3_Install_Wizard.jpg

 

Choose your project then cluster and then click "Deploy Sysdig Monitor":

4_Choose_Project.jpg

 

If all goes well you will see the "Setup is complete" and can now launch the Sysdig Monitor user interface:

7_Setup_Complete.jpg

 

Troubleshooting

If you already have Sysdig Monitor agents installed on your GKE cluster you will see the following error in the previous deployment step:

In this scenario, you need to remove the existing Sysdig Monitor agent installation by going to the Deployment Manager and deleting the two deployments related to sysdig-agent.  Note that due to an issue in the API, this will not remove the configured DaemonSet that starts the sysdig-agent pods.  You will need to remove the DaemonSet manually.

GUI method to remove Deployment:

5_Deployment_Mgr.jpg

Check both 'sdc' items then delete:

6_Delete_Deployment.jpg

The deployment can also be removed using the command line by listing the deployments and removing the two starting with "sdc-agent" and "sdc-cluster" prefixes.

Command Line method to remove Deployment:

gcloud deployment-manager deployments list
NAME LAST_OPERATION_TYPE STATUS DESCRIPTION MANIFEST ERRORS sdc-agent-cluster-1 insert DONE sysdig-cloud-deamonset manifest-1493155796004 [] sdc-cluster-endpoints-cluster-1 insert DONE sdc-cluster-endpoints manifest-1493155778371 []
gcloud deployment-manager deployments delete sdc-agent-cluster-1
gcloud deployment-manager deployments delete sdc-cluster-endpoints-cluster-1

 

Manually Remove GKE Deployment and Sysdig-Agent DaemonSet:

After removing a deployment via GCP's Deployment Manager or the command line method, you need to manually remove the daemonset:

kubectl get daemonsets
   NAME        DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE-SELECTOR AGE
sysdig-agent 3 3 3 0 0 <none> 3d
kubectl delete daemonsets sysdig-agent daemonset "sysdig-agent" deleted

 

After removing the deployment and the daemonset, the pods will be automatically removed and the Sysdig wizard can be used again to redeploy the latest agent version.

 

Creating A Cluster From Command Line

You can create a new GKE cluster with the required base image using the command line and adding the --image-type=CONTAINER_VM flag.

Example:

gcloud container --project "sysdig" clusters create "cluster-2" --zone "us-east1-b" 
--machine-type "n1-standard-1" --scope "https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/logging.write",
"https://www.googleapis.com/auth/monitoring",
"https://www.googleapis.com/auth/servicecontrol",
"https://www.googleapis.com/auth/service.management.readonly" --num-nodes "3"
--network "default" --enable-cloud-logging --enable-cloud-monitoring
--image-type=CONTAINER_VM


Please see the following links for more details:
gcloud container clusters create

gcloud container clusters update

 

 

 

Manager (DM) Templates

Sysdig offers prebuilt DM templates which will automatically deploy Sysdig Monitor across an existing Kubernetes cluster on GKE, including all setup and configuration. The templates and full Readme instructions can be found here:

Daemon Set deployment method - recommended for K8s version 1.2+

Replication Controller deployment method - only needed for older versions of K8s

 

Kubernetes Install 

You can also deploy the Sysdig agent container across your environment yourself using Daemon Sets, by following the Sysdig Install: Kubernetes documentation. 

 

Manual Install

Finally, you can also just deploy and configure the Sysdig agent container manually, by following the standard Sysdig Install documentation. 

 

Have more questions? Submit a request