An Azure platform for running a service on AKS with Terraform, Argo CD, CI, observability and incident handling.
View the Project on GitHub Franklindot04/production-platform-Azure
A pod of the sample service in the namespace apps is deleted, is not ready, or does not start. Session 2 experiment 1 deletes a pod on purpose.
The chart runs 2 replicas and a PodDisruptionBudget with minAvailable: 1. With one pod not ready, the other pod serves all traffic. With both not ready, the Service has no endpoint. The hypothesis of experiment 1 is that traffic continues and a new pod is ready within the probe time. That is not tested.
The probes in helm/sample-service/templates/deployment.yaml:
| Probe | Path | Period | Failures before action |
|---|---|---|---|
| Readiness | /readyz |
5 seconds | 2 |
| Liveness | /healthz |
10 seconds | 3 |
/readyz returns 503 after the process gets a termination signal. SHUTDOWN_DELAY is 5 seconds.
kubectl get pods -n apps -l app.kubernetes.io/name=sample-service -o wide (planned, not run). It shows the state, the restarts, the age and the node of each pod.kubectl describe pod -n apps <pod name> (planned, not run). The events at the end show probe failures, scheduling failures, image pull errors and mount errors.kubectl get events -n apps --sort-by=.lastTimestamp (planned, not run). It shows recent events of the namespace, including failures to create pods.kubectl get endpoints sample-service -n apps (planned, not run). It shows which pod addresses the Service sends to.kubectl logs -n apps <pod name> (planned, not run). It shows the log of the pod. Add --previous for a container that restarted.kubectl get resourcequota -n apps (planned, not run). It shows use against the quota of the namespace (kubernetes/quotas/apps.yaml).ContainerCreating because the secret mount fails. See key-vault-mount-fails.md.apps is used up (500m CPU and 1Gi memory of requests, 20 pods). The events show a failure to create the pod.apps enforces the restricted Pod Security profile. A change to the pod spec that breaks the profile is refused when the pod is created. The events of the ReplicaSet show it.Other causes are not known from the repository.
kubectl get pods -n apps -l app.kubernetes.io/name=sample-service -w (planned, not run). It shows the new pod move to ready.kubectl delete pod -n apps <pod name> (planned, not run). The Deployment creates a new one.kubectl. Self-heal reverts it. See argocd-drift.md.kubectl get pods -n apps -l app.kubernetes.io/name=sample-service (planned, not run). Both pods show 1/1 ready.kubectl get endpoints sample-service -n apps (planned, not run). Both pod addresses are listed.SCENARIO=smoke BASE_URL=http://<ingress address> k6 run tests/load/sample-service.js (planned, not run). All checks pass (tests/load/README.md).Deleting a pod needs no rollback. Reverse a change in Git with a revert pull request.
Session 2 experiment 1, helm/sample-service/templates/deployment.yaml, helm/sample-service/templates/pdb.yaml.
not exercised