In my recent live-lab mini-series with Linode, I got the following question from Sindile Bidla that we didn’t have time to answer on the live-stream. So let’s answer it now…
When you refer to a cluster, is it a single compute resource or a bunch of compute resources taken as a single unit?
A Kubernetes (K8s) cluster is one or more Linux/Windows machines that are pooled together for high availability, scheduling, and other reasons.
More Kubernetes cluster detail
K8s clusters are made up of masters and nodes. Masters host the control plane (API server, cluster store, scheduler, watch loops…) and nodes are where user applications run.
Most of the time, each master and node is a VM or physical server in your on-prem data centre or in your cloud.
The following diagram shows a K8s cluster with 3 masters and 3 nodes. Each master and node is running on its own server and they’re spread across three failure domains.
Masters have to be Linux, but nodes can be a mix of Linux and Windows — Windows apps run on Windows nodes, Linux apps run on Linux nodes.
DIY Kubernetes vs Hosted Kubernetes
A DIY Kubernetes cluster is one that you build and manage yourself — you’re responsible for building and managing the masters and nodes, including H/A, performance and upgrades.
A hosted K8s cluster is one where your cloud provider builds and manages the masters. You get an API endpoint and you never have to think about the masters (the cloud platform takes care of them).
Some hosted Kubernetes services also offer nodeless Kubernetes. This is where user workloads run on the cloud’s container-as-a-service backend and there is no concept of individual nodes. In this scenario, the cloud hides the masters and nodes from you — you focus on apps while the cloud provider handles all infrastructure components.
Single-node Kubernetes clusters
Some development environments, such as Docker Desktop, run all Kubernetes master and node services on a single VM. These are not production-grade, but are examples of Kubernetes running on a single VM.
Hosted Kubernetes is very popular, and nodeless Kubernetes is becoming a thing. These models are great if you’ve no interest in running and hosting your own Kubernetes infrastructure (masters and nodes). However, these models outsource responsibility for your Kubernetes infrastructure to your cloud provider.