Node Taint, Toleration and Affinity

Motivation Pod scheduling can be a nightmare in a large Kubernetes deployment with many nodes having different configurations. Consider the configuration below: NODE A: 16vCPU, 10TB SSD Disk Space, 64GB RAM. NODE B: 4vCPU, 100GB HDD Disk Space, 8GB RAM NODE C: 8vCPU, 100GB HDD Disk Space, 8GB RAM, with additional GPU configuration And scheduling a new deployment to the cluster: kubectl create deployment --image=nginx --replicas=3 Kubernetes would schedule the Pods on a random node....

February 11, 2024 · 6 min · Aleem Isiaka

ConfigMaps in K8s

Motivation Container images often accept Environment Variables for configuring their environments, for example the redis image accepts REDIS_VERSION for a specific redis version. Below command starts a redis container, passing a desired REDIS_VERSION environment variable. crictl run -t redis -e REDIS_VERSION=7.2 redis And to start a redis Pod, imperatively: kubectl run --image=redis --env=REDIS_VERSION=7.2 redis And declaratively: apiVersion: v1 kind: Pod metadata: name: redis label: app: kv-store spec: containers: - name: redis image: redis env: - name: REDIS_VERSION value: 7....

February 6, 2024 · 3 min · Aleem Isiaka