Recall first: read each stage's one-line summary and try to remember its commands. Then open the stage to check yourself.
16 stages95 commands
kind create cluster --name academyCreate a local practice cluster in Docker
kubectl apply -f web.yamlSend a desired state to the API server
kubectl create deployment web --image=nginx:1.27 --replicas=3Create a three-replica Deployment without writing YAML
kubectl rollout status deployment/webWait until the Deployment's Pods are ready
kubectl get pods -wWatch Pods change, for example a deleted one being replaced
kind delete cluster --name academyDelete the local cluster
Watch for Manifests describe your apps, not their data. Rebuilding a cluster from YAML does not bring back volumes or databases.
Open the lesson: Kubernetes: what it solves, and when you don't need it →docker build -t shop-web:v1 --build-arg APP_VERSION=v1 .Build the image with its version baked in
aws ecr create-repository --repository-name shop-web --image-scanning-configuration scanOnPush=trueCreate a private ECR repository that scans every push
aws ecr get-login-password | docker login --username AWS --password-stdin $REGLog Docker in to ECR with a short-lived token
aws ecr describe-images --repository-name shop-webList the pushed tags and their sizes
Watch for Untagged entries in ECR are build attestations and the multi-platform index, not junk to delete.
Open the lesson: Images and registries for Kubernetes →aws eks update-kubeconfig --name academy --region ap-south-1Add the EKS cluster to ~/.kube/config
kubectl cluster-infoShow the API server and CoreDNS addresses
kubectl get nodes -o wideList nodes with IPs, OS and container runtime
kubectl get pods -AList Pods in every namespace, including kube-system
kubectl create deployment hello --image=<your-registry>/shop-web:v1 --replicas=2Run the first app with two replicas
kubectl expose deployment hello --port=80 --target-port=8080Put a ClusterIP Service in front of the Pods
kubectl run curl --image=busybox:1.37 --restart=Never --rm -i --quiet -- wget -qO- http://hello/apiCall the Service by name from a throwaway Pod
Watch for Delete Services and Ingresses that created AWS load balancers before terraform destroy, or the load balancers are left billing.
Open the lesson: Setting up: a cluster, kubectl and your first deployment →kubectl apply -f 04-deployment.yamlCreate the shop-web Deployment with probes and resources
kubectl get replicaset -l app=shop-webSee the ReplicaSet the Deployment created
kubectl scale deployment shop-web --replicas=5Change the desired count for an experiment
kubectl wait --for=condition=Complete job/report --timeout=120sBlock until a Job finishes
kubectl logs -l job-name=report --prefixRead logs from every Job Pod, labelled by Pod
kubectl describe job reportFind why a Job is not completing
Watch for kubectl scale is for experiments. Change replicas in Git, or the next apply puts the old number back.
Open the lesson: Running applications: Pods, Deployments, Jobs →kubectl get endpointslices -l kubernetes.io/service-name=shop-webList the Pod IPs currently behind the Service
kubectl run dns --image=busybox:1.37 --restart=Never --rm -i --quiet -- nslookup shop-web.default.svc.cluster.localResolve a Service name through cluster DNS
helm repo add eks https://aws.github.io/eks-chartsAdd the chart repo for the AWS Load Balancer Controller
kubectl apply -f 05-ingress.yamlCreate an Ingress that becomes an ALB
kubectl get ingress shopRead the load balancer address once it is ready
kubectl describe ingress shopCheck each rule's backend Service and endpoints
kubectl port-forward service/shop-web 8080:80Reach a Service from your machine on kind
Watch for An Ingress rule pointing at a missing Service gives users a 503 while the controller still says Successfully reconciled.
Open the lesson: Services, Ingress and load balancing →kubectl apply -f 06-config.yamlCreate the ConfigMap and the Secret
kubectl set env deployment/shop-web --from=configmap/shop-configLoad every ConfigMap key as an environment variable
kubectl get secret shop-secret -o yamlView the Secret as stored, annotations included
kubectl get secret shop-secret -o jsonpath="{.data.DATABASE_URL}" | base64 -dDecode a Secret value in one line
kubectl rollout restart deployment/shop-webRestart Pods so they read new env values
Watch for kubectl apply with stringData stores the plain-text value again in the last-applied-configuration annotation.
Open the lesson: Configuration: ConfigMaps and Secrets →kubectl apply -f 07-team-a.yamlCreate a namespace with a quota and a limit range
kubectl describe resourcequota team-a-quota -n team-aSee used versus hard limits for the namespace
kubectl get pod memory-hog -o jsonpath='{.status.containerStatuses[0].state.terminated}'Read the reason and exit code of a killed container
kubectl top nodesShow real CPU and memory use per node
kubectl top pods -A --sort-by=memoryFind the Pods using the most memory
Watch for A Deployment stuck below its replica count by a quota shows nothing on its Pods; the FailedCreate events are on the ReplicaSet.
Open the lesson: Resource management: requests, limits, namespaces, quotas →kubectl auth can-i list pods --as=system:serviceaccount:default:viewerAsk what an identity may do without trying it
kubectl auth can-i delete pods --as=system:serviceaccount:default:viewerConfirm a read-only account cannot delete
kubectl apply -f 08-netpol.yamlApply default-deny plus an allow rule for role=frontend
kubectl run front --image=busybox:1.37 --labels=role=frontend --restart=Never --rm -i --quiet -- wget -qO- -T 5 http://shop-web/apiTest the allowed path from a labelled Pod
kubectl label namespace secure pod-security.kubernetes.io/enforce=restrictedEnforce the restricted Pod Security standard on a namespace
Watch for A default-deny policy also blocks the load balancer reaching your Pods, and policies are silently ignored if the CNI does not enforce them.
Open the lesson: Security: RBAC, network policies, Pod Security →kubectl logs deployment/shop-web --tail=3 --timestampsRead the latest log lines from one of the Deployment's Pods
kubectl logs broken --previousRead the log of the container before the current one
kubectl describe pod brokenSee the exit code, restart count and events
kubectl get events -A --sort-by=.lastTimestampGet a quick overview of everything going wrong
kubectl top pods -l app=shop-web --containersShow CPU and memory per container
kubectl describe pvc orphanFind why a claim is stuck Pending
Watch for kubectl logs deployment/... reads only one Pod. Use -l app=shop-web --prefix for all of them.
Open the lesson: Monitoring, logging and troubleshooting →kubectl apply -f 10-hpa.yaml -f 10-load.yamlCreate the HPA and start the load generator
kubectl get hpa shop-webRead current utilisation against target and replica count
kubectl describe hpa shop-webSee SuccessfulRescale events and their reasons
helm install cluster-autoscaler autoscaler/cluster-autoscaler -n kube-system \
--set autoDiscovery.clusterName=academy --set awsRegion=ap-south-1 \
--set rbac.serviceAccount.name=cluster-autoscaler --waitInstall the Cluster Autoscaler on EKS
kubectl get nodes -L topology.kubernetes.io/zoneWatch nodes appear, with their zone
Watch for Do not let a VPA and an HPA both act on CPU for the same Deployment; they fight.
Open the lesson: Autoscaling: Pods and nodes →kubectl get pods -l app=spread -o custom-columns=POD:.metadata.name,NODE:.spec.nodeNameSee which node each Pod landed on
kubectl taint node ip-10-42-0-115.ap-south-1.compute.internal dedicated=batch:NoScheduleKeep Pods without a matching toleration off a node
kubectl get pdb shop-webCheck how many disruptions the budget allows
kubectl drain $N --ignore-daemonsets --timeout=60sCordon a node and evict its Pods
kubectl uncordon $NLet the scheduler use the node again
Watch for A PDB with minAvailable equal to the replica count allows zero disruptions, and the drain times out.
Open the lesson: Scheduling: where Pods run →kubectl get csidriversList the storage drivers installed in the cluster
kubectl get storageclassList the classes a claim can ask for
kubectl get pvc notesCheck that a claim is Bound
kubectl get pvSee the volumes, their reclaim policy and claim
kubectl exec db-0 -- cat /data/idRead a file from a StatefulSet replica's own disk
kubectl delete pvc -l app=dbRemove the claims a StatefulSet left behind
Watch for Deleting a StatefulSet keeps its PVCs, and deleting a PVC with reclaimPolicy Delete deletes the data.
Open the lesson: Storage: data that outlives Pods →helm create shopGenerate a starter chart
helm lint shopCheck the chart for errors
helm template demo shop --set replicaCount=3Render the YAML locally without touching the cluster
helm install shop ./helm/shop --namespace shop --create-namespace --wait --timeout 4mInstall the chart as a release
helm upgrade shop ./helm/shop -n shop --set image.tag=v2 --set replicaCount=3 --wait --timeout 4mUpgrade and wait until the new Pods are ready
helm history shop -n shopList revisions and their status
helm rollback shop 2 -n shop --wait --timeout 4mRoll back to revision 2 as a new revision
helm get values shop -n shopShow the values actually deployed
Watch for Never put secrets in values files committed to Git.
Open the lesson: Helm: packaging Kubernetes apps →kubectl set image deployment/shop-web web=<registry>/shop-web:v2Start a rolling update to a new image
kubectl rollout status deployment/shop-web --timeout=180sWait for the rollout, or time out if it stalls
kubectl rollout undo deployment/shop-webGo back to the previous ReplicaSet
kubectl patch service shop -p '{"spec":{"selector":{"app":"shop","color":"green"}}}'Switch all traffic from blue to green
kubectl patch service shop -p '{"spec":{"selector":{"app":"shop","color":null}}}'Let the Service match both versions for a canary
kubectl scale deployment shop-blue --replicas=3Set the old version's share of a Pod-count canary
Watch for rollout undo changes the cluster, not your YAML. The next apply of the old file brings the bad image back.
Open the lesson: Deployment patterns: rolling, blue-green, canary, GitOps →kubectl get --raw='/readyz?verbose'Check API server health, including etcd
kubectl get daemonsets -n kube-systemList the agents that run on every node
kubectl api-resources | wc -lCount the resource types the API serves
kubectl wait --for=condition=Established crd/websites.academy.example.comWait until a new CRD is served before creating resources
kubectl get crd websites.academy.example.comConfirm the CRD exists
kubectl config get-contextsSee which cluster kubectl points at
Watch for Applying a CRD and its resources in one go can fail with "ensure CRDs are installed first". Apply the CRD, wait, then the resources.
Open the lesson: Advanced: inside the cluster, CRDs and many clusters →helm lint ./shop -f shop/values-prod.yamlCheck the chart with the prod values
helm template shop ./shop -f shop/values-prod.yaml | grep '^kind:' | sort | uniq -cCount the objects an environment renders
kind create cluster --config kind.yamlCreate the three-node practice cluster
kind load docker-image shop-web:v1 shop-web:v2 shop-web:v3-broken busybox:1.37 --name capstoneCopy local images into the kind nodes
kubectl label namespace shop pod-security.kubernetes.io/enforce=restrictedEnforce the restricted Pod Security standard
helm upgrade shop ./shop -n shop -f shop/values-prod.yaml --set image.tag=v2 --waitRelease v2 and wait for it to be ready
kubectl logs -n shop probe | sort | uniq -cCount versions and FAIL lines seen during the release
kind delete cluster --name capstoneDelete the practice cluster
Watch for kind load fails the whole command if one image isn't in your local Docker. Pull busybox first.
Open the lesson: Capstone: a production-ready release of shop-web →