Lab 03 - Scaling, Recovery & Cluster Operations

This lab focused on Kubernetes operational tasks including scaling deployments, verifying self-healing capabilities, and managing application lifecycle operations. The objective was to demonstrate high-availability concepts and Kubernetes automated recovery features.

Difficulty: intermediate Platform: Ubuntu 24.04 Tools: PODs, NGINX, kubectl

Overview

This lab focused on Kubernetes operational tasks including scaling deployments, verifying self-healing capabilities, and managing application lifecycle operations. The objective was to demonstrate high-availability concepts and Kubernetes automated recovery features.

Scaling Deployments

The NGINX deployment was scaled from a single replica to multiple replicas. Kubernetes automatically created additional pods to meet the desired state.

kubectl scale deployment nginx-demo --replicas=3
kubectl get pods
Scaled Pods

Figure 1: Deployment successfully scaled to three replicas.

Load Distribution Validation

Kubernetes distributed application traffic across multiple running pods through the service endpoint.

Load Distribution

Figure 2: Multiple healthy application replicas supporting workload availability.

Pod Failure Simulation

A running pod was intentionally removed to validate Kubernetes self-healing functionality. Kubernetes automatically created a replacement pod to maintain the required replica count.

kubectl delete pod pod-name
kubectl get pods -w
Pod Recovery

Figure 3: Kubernetes automatically recreating a failed pod.

Rolling Restart Operations

Deployment restart operations were tested to ensure application updates could be performed without downtime.

kubectl rollout restart deployment nginx-demo
kubectl rollout status deployment nginx-demo
Rollout Status

Figure 4: Successful deployment restart and rollout validation.

Results

  • Deployment scaled successfully.
  • Multiple replicas created automatically.
  • Pod recovery validated.
  • Kubernetes self-healing confirmed.
  • Rolling restart completed successfully.

Lessons Learned

This lab demonstrated one of Kubernetes' key strengths: automated workload management. Scaling, self-healing, and rolling maintenance operations validated the platform's ability to keep applications available with minimal administrative intervention.