Most Kubernetes pain is self-inflicted and predictable. Here are the mistakes we see most, and the fix for each.
Mistake 1: No resource requests/limits - the scheduler can't pack pods and OOM kills surprise you
Fix: Set requests/limits and use the HorizontalPodAutoscaler for elastic workloads. Make it the default in your templates and enforce it in review or CI so the mistake cannot come back.
Mistake 2: Using :latest images so rollbacks and caching become unpredictable
Fix: Separate config (ConfigMap) from secrets and mount them, don't bake them in. Make it the default in your templates and enforce it in review or CI so the mistake cannot come back.
Mistake 3: Liveness probes that are too aggressive, restarting healthy-but-slow pods
Fix: Use readiness probes to gate traffic and PodDisruptionBudgets for safe drains. Make it the default in your templates and enforce it in review or CI so the mistake cannot come back.
Mistake 4: Treating Secrets as encrypted - they are only base64-encoded at rest by default
Fix: Adopt GitOps (ArgoCD/Flux) so the cluster state lives in reviewed Git. Make it the default in your templates and enforce it in review or CI so the mistake cannot come back.
A safer baseline
A Deployment plus Service with probes and resource limits.
apiVersion: apps/v1
kind: Deployment
metadata: { name: web }
spec:
replicas: 3
selector: { matchLabels: { app: web } }
template:
metadata: { labels: { app: web } }
spec:
containers:
- name: web
image: ghcr.io/acme/web:1.0
ports: [{ containerPort: 3000 }]
resources:
requests: { cpu: 100m, memory: 128Mi }
limits: { cpu: 500m, memory: 256Mi }
readinessProbe:
httpGet: { path: /healthz, port: 3000 }
---
apiVersion: v1
kind: Service
metadata: { name: web }
spec:
selector: { app: web }
ports: [{ port: 80, targetPort: 3000 }]Want senior help putting Kubernetes to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.