Create a Cluster

This lesson focuses on creating a cluster and the necessary requirements and gists for this chapter.

Pulling the code#

The vfarcic/k8s-specs repository will continue being our source of Kubernetes definitions we’ll use for our examples. We’ll make sure that it is up-to-date by pulling the latest version.

🔍 All the commands from this chapter are available in the 04-instrument.sh Gist. Just as in the previous chapter, it contains not only the commands but also Prometheus’ expressions . If you’re planning to copy&paste the expressions from the Gist, please exclude the comments. Each expression has a # Prometheus expression comment on top to help you identify it.

cd k8s-specs

git pull

Given that we learned how to install a fully operational Prometheus and the rest of the tools from its Chart, and that we’ll continue using them, I moved it to the Gists. Those that follow are copies of those we used in the previous chapter, with the addition of environment variables PROM_ADDR and AM_ADDRs and the steps for the installation of the Prometheus Chart. Please create a cluster that meets (or exceeds) the requirements specified in the Gists that follow, unless you already have a cluster that satisfies them.

Gists and specifications#

Choose the flavor you want and run the commands from its .sh file to create the cluster and the required specifications needed in this chapter.

NOTE: In the end, you will see a command to DELETE the cluster too. Don’t execute that command. Use the DELETE command only when you need to delete the cluster, preferably at the end of the chapter.

GKE

  • gke-instrument.sh: GKE with 3 n1-standard-1 worker nodes, nginx Ingress, Prometheus Chart, and environment variables LB_IP, PROM_ADDR, and *AM_ADDR

EKS

  • eks-instrument.sh: EKS with 3 t2.small worker nodes, nginx Ingress, Metrics Server, Prometheus Chart, and environment variables LB_IP, PROM_ADDR, and AM_ADDR

AKS

  • aks-instrument.sh: AKS with 3 Standard_B2s worker nodes, nginx Ingress and Prometheus Chart, and environment variables LB_IP, PROM_ADDR, and AM_ADDR

Docker for Desktop

  • docker-instrument.sh: Docker for Desktop with 2 CPUs, 3 GB RAM, nginx Ingress, Metrics Server, Prometheus Chart, and environment variables LB_IP, PROM_ADDR, and AM_ADDR

Minikube

  • minikube-instrument.sh: minikube with 2 CPUs, 3 GB RAM, ingress, storage-provisioner, default-storageclass, and metrics-server addons enabled, Prometheus Chart, and environment variables LB_IP, PROM_ADDR, and AM_ADDR


In the next lesson, we will face our first simulated issue that might require debugging.

Introduction
Face a Disaster
Mark as Completed
Report an Issue