← All insightsBest Practices

Kubernetes best practices for teams

Nir Geier, CodeWizard · 11 September 2026 · 3 min read · Intermediate

Kubernetes rewards a little discipline. These are the practices that keep it maintainable as a team and a codebase grow.

The practices

  • Set requests/limits and use the HorizontalPodAutoscaler for elastic workloads
  • Separate config (ConfigMap) from secrets and mount them, don't bake them in
  • Use readiness probes to gate traffic and PodDisruptionBudgets for safe drains
  • Adopt GitOps (ArgoCD/Flux) so the cluster state lives in reviewed Git

What good looks like

A Deployment plus Service with probes and resource limits.

yaml
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 }]

Anti-patterns to retire

  • No resource requests/limits - the scheduler can't pack pods and OOM kills surprise you
  • Using :latest images so rollbacks and caching become unpredictable
  • Liveness probes that are too aggressive, restarting healthy-but-slow pods
  • Treating Secrets as encrypted - they are only base64-encoded at rest by default

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.

Like where this is going?

Get hands-on help from the engineers who write these posts.

Book a free consult