
A Kubernetes cluster is a collection of nodes, which are virtual machines or physical servers, working together to run containerized applications managed by Kubernetes. The cluster is the environment your application operates in. Nodes supply the computing resources and run the workloads, and a control plane manages deployment, scaling and operations across those machines. Running applications across a cluster of machines, rather than on a single virtual machine, gives Kubernetes ways to improve service availability.
Kubernetes, often shortened to K8s, is an open source platform that automates the deployment, scaling and management of containerized applications. A container is a lightweight, portable unit that packages an application with its dependencies, so it runs the same way on a developer's laptop, in a testing environment or in production in the cloud.
Google originally developed Kubernetes to automate the deployment, scaling and management of its own containers, of which it manages billions every week. Now a widely adopted open source project, it addresses three problems in particular:
A node is a worker machine in the cluster. Each node runs a set of pods and provides the resources they need, such as CPU, memory and storage. Nodes can be added to or removed from a cluster as needed, which lets Kubernetes scale with the workload. If a node fails, Kubernetes reschedules the pods that were running on it onto healthy nodes, so the application stays available.
Node pools let a single cluster contain groups of nodes with different machine types. A cluster might have a pool of compute-optimized nodes for processing-heavy work such as scientific calculations or video encoding, alongside a pool of standard nodes for general-purpose applications. Workloads can then be assigned to the pool that suits them, which helps with both performance and cost.
A pod is the smallest deployable unit in Kubernetes. It contains one or more tightly coupled containers that share the same network namespace and storage volumes. A pod typically hosts a single instance of an application or a single microservice. To run more than one instance, Kubernetes creates multiple identical pods, called replicas, and distributes them across nodes based on resource availability and scheduling requirements.
The structure nests from the top down. A cluster is made up of multiple nodes, each node hosts multiple pods, and each pod holds one or more containers.
The control plane is the central management layer of a cluster. It coordinates the processes running in the cluster, manages workloads and makes sure the cluster's desired state is always maintained. It has three key components:
Kubernetes works from a desired state. You describe what you want in a Kubernetes manifest, a file usually written in YAML (JSON also works) that defines objects in the cluster such as pods, services and deployments. The manifest acts as a blueprint, and Kubernetes treats it as the source of truth. If something changes or fails, Kubernetes uses the manifest to bring the system back to the state it describes.
For most applications, the object that ties this together is a deployment. A deployment is a high-level resource that manages an application's instances declaratively. It specifies details such as how many pod replicas should run, which container image to use (which sets the version of the application), the ports the application communicates on and the update strategy. A deployment manages a replica set, and the replica set creates and scales pods to keep the desired number of replicas running. Deployments suit stateless services, and an application typically has one deployment per service.
Put together, the pieces form a loop. A request to create or change a deployment arrives through the API server, the replica set creates the pods it needs, and the scheduler places each pod on a node with the resources to run it. The controller manager keeps watching so the replica count stays where the deployment says it should be. When the container image changes, a rolling update replaces old pods gradually, which keeps downtime to a minimum, and the autoscalers adjust the number of running containers as load rises or falls.
Google Kubernetes Engine is Google Cloud's managed Kubernetes service. It lets you run, manage and scale containerized applications on Google Cloud's infrastructure without handling the underlying complexity of Kubernetes yourself. A GKE cluster has the same shape described above, with nodes that run your containerized workloads and a control plane that manages them, and GKE takes on much of the operational work around it:
GKE is particularly well suited to complex microservice architectures. Each microservice runs in its own containers, so it can be deployed, scaled and managed independently of the others. Kubernetes and GKE appear on both the Associate Cloud Engineer and Professional Cloud Architect exams.
If you want to go further with GKE, our Associate Cloud Engineer course covers it in more depth.