Kubernetes Pod
A Pod wraps one or more containers that run on the same node and share a network namespace (one IP, localhost between them) and volumes. Pods are disposable: when one dies it is replaced by a new one with a new IP, which is why controllers and Services exist. Part of Kubernetes.
Key concepts #
- Sidecar and init containers: helpers that run next to or before the main container.
- Phases: Pending, Running, Succeeded, Failed. Container states: Waiting, Running, Terminated.
- Controllers: a Deployment creates and replaces pods for you.
- Probes and resources: health checks and CPU and memory settings, see probes and limits.
Learn it #
Create them through Pods and Deployments and fix the failures with How to debug Kubernetes, CrashLoopBackOff, ImagePullBackOff and Pending.
More tutorials that use Kubernetes Pod
- Kubernetes Persistent Volumes, PVC and StorageClass: Complete Guide
- Kubernetes Architecture Explained: Control Plane, Nodes and Components
- Kubernetes Services and Ingress: ClusterIP, NodePort, LoadBalancer and Routing
- Kubernetes Horizontal Pod Autoscaler (HPA): CPU, Memory and Custom Metrics
- Kubernetes ConfigMaps and Secrets: Environment Variables, Files and Best Practices
- Kubernetes Namespaces and RBAC: Roles, ServiceAccounts, Quotas and kubectl auth can-i
- Convert Docker Compose to Kubernetes: Kompose and Manual Migration
- Kubernetes Cluster using Vagrant and Ansible with Containerd (in 3 minutes)