Kubernetes (K8s) orchestrates containers at scale. While platform teams manage clusters, developers need to understand K8s concepts to deploy and debug applications effectively. This guide covers what developers actually need to know.
Core Concepts
Pods
The smallest deployable unit. Usually one container, sometimes sidecars:
Deployments
Manage pod replicas and updates:
Services
Expose pods to network traffic:
Configuration Management
ConfigMaps
Using in deployments:
Secrets
Using secrets:
Health Checks
Liveness and Readiness Probes
Liveness: Is the container alive? Failure triggers restart. Readiness: Can it receive traffic? Failure removes from service. Startup: For slow-starting apps, delays other probes.
Debugging Applications
Common Commands
Debugging Checklist
Pod not starting:
1. kubectl describe pod <name> - Check events
2. kubectl logs <name> - Check application logs
3. Verify image exists and is pullable
4. Check resource limits (OOMKilled?)
Pod running but not accessible:
1. kubectl get endpoints <service> - Any endpoints?
2. Verify selector labels match
3. Check service port configuration
4. Test with port-forward
Application errors:
1. kubectl logs -f <name> - Live logs
2. kubectl exec -it <name> -- sh - Interactive debug
3. Check ConfigMaps and Secrets mounted correctly
4. Verify environment variables
Deployment Strategies
Rolling Update (Default)
Blue-Green with Services
Resource Management
Requests and Limits
Horizontal Pod Autoscaler
Ingress
Expose to Internet
Jobs and CronJobs
One-Time Jobs
Scheduled Jobs
Local Development
Minikube
Skaffold
Conclusion
Kubernetes knowledge empowers developers to deploy confidently and debug effectively. Focus on deployments, services, config management, and debugging—leave cluster administration to platform teams.
AI helps generate manifests, troubleshoot issues, and understand complex configurations. Start with simple deployments, add health checks, then expand to autoscaling and advanced patterns as needed.