Kubernetes (K8s) & AKS
Architecture
Control plane: API server · etcd · scheduler · controller manager · cloud controller. Nodes: kubelet · kube-proxy · container runtime.
Objects
Pod · ReplicaSet · Deployment · StatefulSet · DaemonSet · Job · CronJob · Service (ClusterIP/NodePort/LoadBalancer/ExternalName/headless) · Ingress / Gateway API · ConfigMap · Secret · PV / PVC / StorageClass · Namespace · ServiceAccount · Role/RoleBinding · NetworkPolicy · HPA · PDB · ResourceQuota.
kubectl
kubectl get pods -A -o wide kubectl describe pod <p>
kubectl logs <p> --previous -f kubectl exec -it <p> -- sh
kubectl apply -f file.yaml kubectl delete -f file.yaml
kubectl rollout status|history|undo deploy/<d>
kubectl scale deploy/<d> --replicas=5
kubectl port-forward svc/<s> 8080:80
kubectl top pods kubectl get events --sort-by=.lastTimestampProbes
Liveness → restart · Readiness → remove from endpoints · Startup → delay others.
Resources
Requests (scheduling) · Limits (CPU throttle, memory OOMKill) · QoS: Guaranteed / Burstable / BestEffort.
Pod phases & errors
Pending · Running · Succeeded · Failed · Unknown — ImagePullBackOff · CrashLoopBackOff · OOMKilled · CreateContainerConfigError.
Deploy strategies
Rolling (default) · Recreate · Blue-green · Canary · A/B. Rollback: kubectl rollout undo / helm rollback.
AKS
az aks create/get-credentials/upgrade/nodepool add · attach ACR · Workload Identity + Key Vault CSI · Azure CNI · Container Insights · KEDA · AKS Automatic · consider Azure Container Apps for simpler needs.