Kubernetes
| Technology | |
|---|---|
![]() Image placeholderPlace the file shown below in the assets/articles folder kubernetes.webp | |
| Original author | |
| First release | 2014 (v1.0 July 2015) |
| Maintained by | CNCF and community |
| Written in | Go |
| Website | kubernetes.io |
Kubernetes (often abbreviated K8s) is a container orchestration platform. Users declare a desired state, such as "run three replicas of this container", and Kubernetes works continuously to make the actual state match.
History
Kubernetes was created at Google and open-sourced in 2014. It was influenced by Google's internal cluster manager Borg. Version 1.0 was released in July 2015 and the project was donated to the Cloud Native Computing Foundation (CNCF).
Architecture
A cluster has a control plane and worker nodes. The control plane includes the API server, etcd (a consistent key-value store holding cluster state), the scheduler, and controller managers. Each node runs a kubelet, a container runtime and a network proxy. The smallest deployable unit is a Pod, one or more containers sharing network and storage.
+--------- Control plane ---------+
| API server | scheduler | etcd | ctl |
+--------------------+---------------+
|
+---------------------+--------------------+
| Node 1 | Node 2 |
| kubelet + runtime | kubelet + runtime |
| [Pod][Pod] | [Pod][Pod] |
+---------------------+--------------------+Key mechanisms
Controllers implement a reconciliation loop: observe state, compare with the spec, act to close the difference. Deployments manage rolling updates of ReplicaSets, Services provide stable network endpoints, and Ingress routes external HTTP traffic. Custom Resource Definitions let users extend the API.
Adoption
Kubernetes is offered as a managed service by major cloud providers and is widely used for running microservices and batch workloads.
Ecosystem
The ecosystem includes Helm (package management), Prometheus (monitoring), and service meshes. Container images are commonly built with Docker.
Comparison with alternatives
Alternatives include HashiCorp Nomad, Docker Swarm, and platform-as-a-service offerings.
Limitations
Kubernetes has considerable operational complexity, and small applications may not need it.
Desired state and reconciliation
Kubernetes is built around declarative configuration. An operator describes the desired state of an application, such as the number of replicas, container images, network exposure and storage needs. Controllers continuously compare that desired state with the observed state of the cluster and take action when the two differ. If a Pod stops running, a controller may create another one. If the number of replicas is too low, a controller attempts to restore the requested count.
This reconciliation model is different from writing a one-time sequence of commands that starts a fixed set of processes. A cluster is expected to change as machines fail, workloads are updated and capacity is added or removed. The API server exposes the cluster's objects, while etcd stores the persistent cluster state. The scheduler selects suitable nodes for Pods, and node agents work with the container runtime to start workloads.
Core objects
A Pod is the smallest deployable unit in Kubernetes and can contain one or more closely related containers that share networking and selected storage. Deployments manage replicated stateless workloads and support rolling updates. StatefulSets provide stable identities and ordering for applications that need them. DaemonSets run a Pod on selected nodes, while Jobs and CronJobs represent finite or scheduled work.
Services provide a stable network identity for a changing group of Pods. Ingress resources and the Gateway API can describe external HTTP routing, depending on the cluster's installed components. ConfigMaps store non-sensitive configuration, while Secrets are intended for sensitive values; Secret objects still need appropriate encryption, access control and operational handling. PersistentVolumes and PersistentVolumeClaims separate storage provisioning from an application's request for storage.
Networking and storage
Kubernetes networking assumes that Pods can communicate using cluster networking, but the implementation is provided by a network plugin. That plugin is responsible for routing, address allocation and may provide network policy enforcement. Different clusters use different networking implementations, so operators need to understand the capabilities and limitations of their chosen plugin.
Storage is similarly extensible. A storage driver can provision disks, attach volumes to nodes and expose persistent data to workloads. Applications that store important state still need backup, replication and recovery plans. Kubernetes can automate mounting and lifecycle operations, but it does not automatically make a database highly available or guarantee that data can be recovered after every failure.
Scheduling, scaling and updates
The scheduler evaluates resource requests, node constraints, affinity rules, taints and tolerations when placing Pods. Resource requests help the scheduler make placement decisions, while limits can constrain CPU and memory usage at runtime. Horizontal Pod Autoscaling can adjust replica counts based on metrics, and cluster autoscalers can add or remove worker nodes when supported by the infrastructure.
Rolling updates replace application instances gradually. Readiness probes help determine whether a new instance should receive traffic, while liveness probes can trigger a restart when a container is unhealthy. Poorly configured probes or resource limits can cause instability, so production deployments need measurement and testing rather than copied configuration alone.
Security and operational complexity
A Kubernetes cluster is a distributed system with a large control surface. Role-based access control should grant users and services only the permissions they need. Network policies can restrict communication, images should come from trusted sources, and the control plane and node operating systems need regular updates. Secrets management, audit logging and admission controls are additional parts of a secure deployment.
Kubernetes can standardise deployment across environments, but it also introduces operational complexity. Teams must operate the control plane, networking, storage, observability and upgrade processes or pay a managed provider to do so. Small services may be easier to run on a simpler platform. Kubernetes is most valuable when its orchestration capabilities solve a real coordination problem rather than being adopted as an end in itself.
Editorial connections and engineering implications
Reconciliation and desired state
Kubernetes uses a declarative control model. An operator describes a desired state, such as the number of replicas in a Deployment, and controllers repeatedly compare actual state with that target. They take corrective action when a Pod fails or when the observed state drifts. This reconciliation loop is more resilient than a one-off deployment script, but it does not make an application automatically reliable.
The control plane, scheduler, node agents and container runtime each have distinct responsibilities. Applications still need sound readiness checks, resource requests, graceful shutdown, storage design and health monitoring. Kubernetes adds operational work around networking, DNS, storage classes, secrets, access control, upgrades and observability. It is valuable when standardised deployment and scheduling across many workloads justify that complexity. Smaller projects may be better served by Docker Compose or a managed platform. Kubernetes works best alongside version control, automated testing and careful operations practice.
See also
- Docker – A platform for building, distributing and running applications in containers.
- Google – An American technology company known for web search, Android, cloud computing and AI research.
- Microservices – An architectural style that structures an application as independently deployable services communicating through explicit interfaces.
- Domain Name System (DNS) – The distributed naming system that translates human-readable domain names into records used to locate internet services.
- Git – A distributed version control system that tracks changes to files as a graph of snapshots.
- Big-O Notation – A notation describing how the resource use of an algorithm grows as the input size grows.
- Idempotency – The property of an operation that produces the same result whether it is applied once or many times.
- Linux – A family of open-source, Unix-like operating systems based on the Linux kernel.
References
- ↑ Kubernetes Documentation (kubernetes.io)
