Kubernetes deployment

Install the Analyzer on Google Kubernetes Engine


  • Having a GCP account with permissions to create and administer Kubernetes Clusters.
  • A GCP Project with Kubernetes API active.
  • Having a machine with kubectl, gcloud and helm installed.

Install the necessary tools

On the machine or VM you will use to administer the cluster:

Download the Helm charts

You can download the helm charts with:

wget https://api.latence.ca/software/k8s-analyzer.zip

Create a cluster

  • Once the Kubernetes API is activated and you have the necessary permissions to create and administer a Cluster, we will create one.
  • On your Project page, click on Kubernetes Engine.

  • Once in the Clusters tab, click on Create and select the Standard Cluster.

  • In the Cluster basics section, name your analyzer.
  • Click on default pool and change the number of nodes from 3 to 1, check the Enable cluster autoscaler box.

  • Lower down the page, set the Minimum number of nodes at 1 and Maximum number of nodes at 2.

  • Click on the Nodes tab on the left and change the image type from Container-Optimized OS with containerd to Ubuntu with containerd.
  • In the Machine configuration section, set the machine type to fit the requirements to host the analyzer as described in docs.latence.ca.
  • Set the boot disk size at 20GB as requested for the analyzer to run properly.

  • If your application can handle a less stable environment, select Enable nodes on spot VMs, since this is a demo/test environment, we can check the box. This will also reduce the cost of the cluster.

  • In the Automation tab on the left, select Enable vertical Pod autoscaling.

  • Finally you can hit Create, and wait for your cluster to be set up.

Install the Analyzer

You can remotely connect to your cluster using this command in your terminal:

gcloud container clusters get-credentials <cluster-name> --zone <cluster-zone> --project <project-name>
  • You can see the running components of your cluster by entering:
kubectl get all
  • Take note of the Cluster-IP.

  • We will need to modify three parameters in our values.yaml file:
    1) The Latencetech License.
    2) The IP address the Kafka pod will use.
    3) The IP address zookeeper will use.

  • Set your license.

  • Set the IP address Kafka will use in the IP range of the Cluster-IP we saw above.

  • Set the IP address Zookeeper will use in the IP range of the Cluster-IP we saw above.
  • Set that same IP address as zookeeperEndpoint in the Kafka section

  • Once the IP addresses are set, we can install the analyzer running this command:
helm install analyzer k8s-analyzer/
  • Wait 60 seconds for all the services and pods to be deployed.
  • You can check the status of deployment by running:
kubectl get all
  • Once done, you can get the External IP address your analyzer was deployed at running this command:
kubectl get svc