What is Kubernetes (K8s)?
Kubernetes is an open-source system for automating the deployment, scaling, and management of containerized applications. It maintains a declared desired state, continuously reconciling actual infrastructure toward what was specified.
#How Kubernetes works
The model is declarative. You describe the desired state, such as five replicas of this container with these resource limits, and controllers continuously compare actual state against it and act to close the gap. A crashed pod is replaced because actual replica count fell below desired.
The core objects are pods, which group one or more containers as the unit of scheduling; deployments, which manage replica sets and rolling updates; services, which provide stable network endpoints across changing pod IPs; and the scheduler, which places pods on nodes based on resource requests and constraints.
#Why Kubernetes is used
It provides a common substrate for running services with consistent operational primitives.
- Self healing: failed pods and unhealthy nodes are replaced without intervention.
- Declarative rollouts: rolling updates and rollbacks are built in.
- Resource efficiency: bin packing across nodes improves utilization.
- Portability: the same manifests run across clouds and on premises.
#Limits and operational cost
Kubernetes is complex, and the complexity is not optional. Networking, storage, ingress, RBAC, and resource management each have significant depth, and a team adopting it takes on a substantial operational surface that has to be learned and maintained.
It also relocates problems rather than eliminating them. Resource limits set incorrectly produce OOMKilled containers, requests set too high produce unschedulable pods, and the failure modes are Kubernetes specific rather than application specific. For small deployments, the operational cost frequently exceeds the benefit.
#Kubernetes vs serverless
Serverless platforms abstract infrastructure entirely: you deploy a function or container and the platform handles scaling, placement, and capacity. Operational burden is minimal and control is minimal.
Kubernetes gives full control over scheduling, networking, and resource allocation, at the cost of operating the cluster. The choice usually comes down to whether you need that control. Teams running many services with varied requirements, specific networking needs, or workloads that do not fit serverless constraints choose Kubernetes. Teams running a handful of stateless services often find serverless cheaper in both money and attention.
#Key takeaways
- Kubernetes reconciles actual state toward a declared desired state through controllers.
- Core objects are pods, deployments, services, and the scheduler that places workloads on nodes.
- The operational complexity is substantial and unavoidable, spanning networking, storage, and RBAC.
- It relocates failure modes into Kubernetes specific ones such as OOMKilled and unschedulable pods.
#Frequently asked
When is Kubernetes the wrong choice?
When you run a small number of simple services. The operational cost of the cluster exceeds the benefit until service count and complexity justify it.
What causes most Kubernetes production issues?
Resource requests and limits set incorrectly. Too low produces evictions and OOMKills, too high produces unschedulable pods and wasted capacity.
Does Kubernetes make applications reliable?
It handles infrastructure level failures such as crashed pods and failed nodes. It does nothing about application defects, which remain the more common cause of incidents.
#Sources
Related terms
- 3 min
OOMKilled Errors
SRE conceptsOOMKilled is a container termination reason indicating that the Linux out-of-memory killer terminated a process because memory could not be allocated.
- 3 min
Pod Pending State
SRE conceptsA Pod in the Pending phase has been accepted by the Kubernetes cluster, but one or more of its containers has not yet been set up and made ready to run.
- 2 min
Production Systems
SRE conceptsProduction systems are live environments that perform real business, customer, or operational workloads.
- 3 min
Bring Your Own Cloud (BYOC)
SRE conceptsBring your own cloud is a deployment model in which some or all of a vendor's software runs in cloud infrastructure controlled or paid for by the customer.