Automation
Kubernetes Automation
Cheat sheet · https://pcornel.dk/topic.php?topic=5791
Answer
Kubernetes automation manages clusters and workloads declaratively with kubectl apply, Helm, Kustomize, operators and GitOps tools, using manifests for Deployments, Services, ConfigMaps and Secrets.
Remember
- Declare desired state; don't run imperative fixes.
- Secrets are only base64 by default.
- Use server-side dry run to catch errors.
First checks
kubectl version— client/serverkubectl auth can-i --list— permissionskubectl diff -f manifests/— preview
Commands
kubectl- Kubernetes command-line client for reading and changing cluster objects.
Verify in this order
manifests → validate → diff → apply/sync → health
Where it usually breaks
Automation/controller success is not target-state proof; target config/state is not effective-runtime proof; effective state is not workload proof.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5791