Why Kubernetes exists
What problem does Kubernetes solve?
Kubernetes is software that helps operate containerized applications across a collection of computers. Instead of manually keeping every application copy running, you describe the workload you want. Kubernetes coordinates the work needed to maintain it. Imagine a shop website with three running copies: if one disappears, Kubernetes can arrange for a replacement when the workload is managed by a suitable controller.
From an application to a cluster
An application is software that performs a useful task, such as displaying products. A container image packages an application and the files it needs to start. A running container is an isolated execution environment for the application process. A Pod is the unit Kubernetes places on a computer; it contains one or more containers that share a network identity and can share storage. A node is a computer that participates in Kubernetes. A cluster is the group of machines and management components working together.
Example: three copies of a shop
A replica is a copy of a workload. Suppose each of three Pods runs the same web application, and the shop has configured a Deployment, a Kubernetes object that manages these copies. One Pod is lost. Without workload management, an operator may need to notice the failure and start another copy manually. With a working Deployment and its associated ReplicaSet controller, Kubernetes can create a replacement Pod. It may run on a different node. It is not necessarily the same Pod brought back to life.
Offline example (not actual cluster output): desired copies = 3; existing copies after failure = 2; replacement created = 1. If the replacement becomes ready, the shop has three ready copies again.
Scaling and recovery are different
Scaling changes the number of copies you want, for example from three to five when demand increases. Recovery tries to restore the number already requested after a failure. Increasing replicas does not automatically increase the capacity of the computers underneath them. The application must also be designed to work with multiple copies.
What Kubernetes does not do for you
Kubernetes is not a compiler, image builder or database. It does not automatically make software bug-free, preserve every piece of data, or guarantee that a failed application becomes healthy. A replacement can fail if its image is unavailable or there is not enough computing capacity. You still need monitoring, a suitable application design and a recovery plan.
Practice: explain a recovery
A fictional library runs four identical web Pods through a Deployment. One is permanently lost. Identify the desired count, the remaining count and the missing count. Describe what Kubernetes can attempt, and name one reason the replacement might not work. No installation or account is required. Next: Desired state and reconciliation.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Why Kubernetes exists — knowledge check
Apply the concepts from this lesson to short offline scenarios.
A shop loses one of three Deployment-managed Pods. What can Kubernetes attempt?
What does a container image provide?
Which unit is placed on a Kubernetes node?
A Deployment changes its requested replicas from three to five. What is this?
Which situation can prevent a replacement from becoming ready?