Containers, Kubernetes Workloads, and Health Probes
Containers package an application and dependencies while sharing the host kernel. Kubernetes reconciles desired state. Deployments manage stateless replicas; StatefulSets provide stable identities and storage association; Services provide stable discovery and routing; Ingress or Gateway resources expose HTTP traffic.
Readiness determines whether an instance should receive traffic. Liveness detects a process that may need restarting. Aggressive liveness checks can create restart loops during transient overload, while incorrect readiness can route requests to an instance that cannot serve them. Startup probes help applications with long initialization.
Running a database in Kubernetes does not automatically make it highly available. Stateful workloads require storage guarantees, backups, upgrade plans, failover testing, and operational expertise. A managed database may be a better trade-off when its constraints fit the use case.
- Kubernetes automates desired state but does not remove failure modes.
- Readiness and liveness probes serve different purposes.
- Stateful services need explicit recovery and storage design.