8

If I run kubectl get nodes on GKE, EKS, or DigitalOcean Kubernetes, I only see the worker nodes. How are these systems architected at the network or application level to create this separation between workers and masters?

Thomas Fussell
  • 458
  • 3
  • 9

2 Answers2

5

You can run the Kubernetes control plane outside Kubernetes as long as the worker nodes have network access to the control plane. This approach is used on most managed Kubernetes solutions.

Lukas Eichler
  • 5,689
  • 1
  • 24
  • 43
  • who's creating the `Node` objects in the kubernetes API? the node controller? How does it know when it should create a `Node` object or not so it appears issuing `kubectl get nodes`? – Jose Armesto Apr 17 '19 at 15:36
  • 1
    The `Node` object is created when a new kubelet process is connected to the cluster. Theoretically you could run multiple kubelets or Nodes on the same VM. – Lukas Eichler Apr 18 '19 at 07:00
  • The kubelet is running on the master too right? So don't they show up running `kubectl get nodes`? – Jose Armesto Apr 18 '19 at 09:46
  • @fiunchinho It's a common practice to run the master on specific nodes on the cluster but there is no requirement to do so. The master components can anywhere and without a kubelet as long as there is a network connection between the api server and the worker node kubelets. – Lukas Eichler Apr 18 '19 at 15:18
  • All of the guides I've found for bootstrapping a cluster include running kubelet on the master nodes. I see now that this isn't required. It would be nice if this "masterless" setup were documented somewhere. Maybe I'll write a blog post about it. Thanks for the answer and discussion. – Thomas Fussell Apr 19 '19 at 13:15
0

A Container Engine cluster is a group of Compute Engine instances running Kubernetes. It consists of one or more node instances, and a managed Kubernetes master endpoint. Every container cluster has a single master endpoint, which is managed by Container Engine. The master provides a unified view into the cluster and, through its publicly-accessible endpoint, is the doorway for interacting with the cluster.

The managed master also runs the Kubernetes API server, which services REST requests, schedules pod creation and deletion on worker nodes, and synchronizes pod information (such as open ports and location) with service information.

More info can be found here

Vit
  • 7,740
  • 15
  • 40