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
Probes of the sample service fail, or requests do not reach the pods, because a network policy blocks the path. Session 2 experiment 6 applies a blocking policy on purpose. It is optional there.
The namespace apps has a default-deny policy for ingress and egress. Only the paths in kubernetes/network-policies/apps.yaml are open:
| Policy | Allows |
|---|---|
allow-dns |
Egress to kube-dns in kube-system, port 53 |
allow-ingress-controller |
Ingress to the sample service on port 8080 from app-routing-system |
allow-egress-to-collector |
Egress from the sample service to the Collector in observability, ports 4317 and 4318 |
allow-metrics-scrape |
Ingress to the sample service on port 8081 from pods labelled rsName: ama-metrics in kube-system |
The hypothesis of experiment 6 is that the probes fail and the alert fires. Probe traffic is not blocked by the default-deny policy: both sample service pods stayed Ready, with no restarts, while it was applied in Session 1 (kubernetes/README.md). One thing is not known:
docs/slos.md).The repository has no manifest for the experiment policy. Which policy the experiment applies is not known.
kubectl get networkpolicy -n apps (planned, not run). It lists the policies. Compare with default-deny and the four above.kubectl describe networkpolicy <policy name> -n apps (planned, not run). It shows what the policy selects and allows.kubectl get pods -n apps -l app.kubernetes.io/name=sample-service (planned, not run). It shows whether the pods are ready.kubectl describe pod -n apps <pod name> (planned, not run). The events show readiness and liveness probe failures.kubectl get endpoints sample-service -n apps (planned, not run). A pod that is not ready is missing from the list.SCENARIO=smoke BASE_URL=http://<ingress address> k6 run tests/load/sample-service.js (planned, not run). It shows whether requests through the ingress succeed.kubernetes/ (the Application cluster-rules). See argocd-drift.md.kubernetes/network-policies/ in Git that removed a path.Other causes are not known from the repository.
kubectl delete networkpolicy <policy name> -n apps (planned, not run). It removes the policy.default-deny to get traffic through. Add the missing allow rule in Git.kubectl get pods -n apps -l app.kubernetes.io/name=sample-service (planned, not run). Both pods are 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). The checks pass.If you deleted a policy that was in Git, Argo CD restores it. If you deleted one that was not, apply it again from the file you kept. Nothing else to undo.
Session 2 experiment 6, ADR 0015, kubernetes/README.md, kubernetes/network-policies/apps.yaml.
not exercised