Use this when Kubernetes deployments by automation fail.
Kubernetes Automation Troubleshooting
Troubleshoot Kubernetes automation with kubectl get events, describe and logs, kubectl diff and --dry-run=server for manifests, RBAC checks with kubectl auth can-i, and Helm or GitOps controller status.
1. Failures: invalid manifests, RBAC denies, image pulls, probes, admission policies, quota.
2. Read events and logs.
3. Server-side dry run.
4. Check admission controllers.
5. Fix in source.
manifest → API admission → scheduling → container → events
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Common mistakes Narrow the fault
- Looking only at
kubectl applysuccess; the rollout can still fail.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Events explain most failures.
- kubectl diff and server-side dry run catch errors early.
- RBAC denials look like failures.
kubectl describe <obj>— eventskubectl get events -n <ns> --sort-by=.lastTimestamp— recent eventskubectl logs <pod> --previous— crashed container logs
ReferenceWhy it matters1 section · depth on demand
What it is
Kubernetes automation failures show up in events, pod status and controller logs.
ReferenceHow it works2 sections · depth on demand
Example
kubectl get events -A --sort-by=.lastTimestamp | tail
kubectl describe pod web-xyz
kubectl logs deploy/web --previous
In depth
Troubleshooting Kubernetes automation usually starts from one question: what does the cluster report about the object? kubectl describe and events explain most failures — image pulls, scheduling, failing probes, permission errors — before logs are needed.
| Symptom | Check |
|---|---|
Pod Pending | describe pod: insufficient resources, node selectors, PVC not bound |
ImagePullBackOff | Image name/tag, registry credentials |
CrashLoopBackOff | logs --previous, command, config, probes |
| Apply rejected | Schema, admission webhooks, RBAC (auth can-i) |
| Service unreachable | Endpoints, selectors, NetworkPolicy |
| GitOps OutOfSync | Diff in Argo CD/Flux, ignored fields |
kubectl get events -n tools --sort-by=.lastTimestamp | tail -20
kubectl describe pod <pod> -n tools
kubectl logs <pod> -n tools --previous
ReferenceImportant terms & boundaries1 section · depth on demand
Mechanics
The linked authority for bounded mechanics is Kubernetes Documentation; documentation support is separate from observed lab/production Evidence.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Kubernetes Automation > Kubernetes Automation Troubleshooting. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://kubernetes.io/docs/home/ · confidence 94%