liveBook · Manning

Computer cluster

As explained in Kubernetes for Developers

A cluster is a group of machines managed together as a shared computing resource.

Running containers by hand on separate machines means configuring and maintaining each host individually. A cluster turns those machines into a shared pool of computing resources. Kubernetes can place containers on that pool, so an application is not tied to one specially configured machine. If a machine fails, another can take over its work. section 1.2

In Kubernetes, the machines are called nodes. They are usually virtual machines, though they can be bare-metal machines. Together, the nodes and the control plane form the cluster. The control plane stores cluster state and coordinates which containers run where; each node runs a kubelet and container runtime to manage its containers. On a managed cloud service, the control plane may be hosted for you, leaving worker nodes as the machines you normally see. section 3.1.1

Figure 3.3 Cloud-based Kubernetes cluster with nodes connecting to a hosted control plane
03-03

Compare the hosted control plane with the worker nodes connected to it. This is the useful mental picture when a cloud provider manages the control plane. section 3.1.1

You interact with a cluster through the Kubernetes API, commonly using kubectl. A Deployment manages Pods, which define the containers to run; a Service provides a network endpoint. You declare the result you want in configuration, and Kubernetes works to maintain it. For example, you can request that a service run across multiple availability zones rather than assigning its containers to individual machines yourself. section 3.1 section 1.2 section 3.5

Choose a cluster environment for the job:

  • A cloud cluster is suited to publishing a service with a public IP and can provide resources across multiple machines. section 3.2.1 section 3.4
  • A local cluster is useful for quick development, learning, and testing deployment configuration, but its fixed resources and lack of a public load balancer change how services are accessed. section 3.2.1 section 3.4
CLUSTER_NAME=my-cluster
REGION=us-west1
gcloud container clusters create-auto $CLUSTER_NAME --region $REGION
gcloud container clusters get-credentials $CLUSTER_NAME --region $REGION

This GKE Autopilot command sequence creates a cloud cluster and retrieves credentials so kubectl can connect to it. It is one concrete setup path, not a requirement to use GKE. section 3.2.1

How Kubernetes for Developers covers it

How deep it goes
Explains control-plane and node responsibilities, then gives a cluster-creation path; leaves broader scaling and operations for later.
Examples
Uses a multi-zone service, a hosted control-plane diagram, and GKE Autopilot creation and connection commands.
What it assumes
Starts with nodes and containers; requires a cluster and authenticated kubectl to follow deployment examples.
What you can do after
Operate/configure it with kubectl after connecting to a cluster, then deploy containers through Deployments and Services.
How it connects
Connects clusters to nodes, control planes, container runtimes, Pods, Deployments, Services, and the Kubernetes API.

Also explained in

Compare how 8 books explain computer cluster →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes for Developers. The section links point to the parts of the book it draws on.