0

This is the definition of a node in kubernetes docs:

"A Node is a worker machine in Kubernetes and may be either a virtual or a physical machine, depending on the cluster."

My question is , what is the real use case scenario for creating new nodes ? Let's say I install kubernetes on my personal laptop, is it good practice to create multiple nodes on a single machine ? Let's say I have 8 cpus on my single machine , is it good practice to create a node for every cpu and allocate that resource to each node ?

Or is it a more common scenario that a node is a virtual machine in a server ?

moth
  • 1,833
  • 12
  • 29
  • 1
    From the [tag:kubernetes] wiki: *KUBERNETES QUESTIONS MUST BE SPECIFICALLY RELATED TO SOFTWARE DEVELOPMENT. Configuration and deployment is off-topic here.*. – Ken White May 31 '23 at 03:53

1 Answers1

1

Or is it a more common scenario that a node is a virtual machine in a server ?

A k8s cluster always has multiple nodes, mostly in odd numbers. The reason behind having odd number of nodes is the Raft Algorithm implemented inside K8s data store (ETCD). It needs to maintain a quorum of at least (n + 1)/2 nodes for Leader election. The minimum number for a stable quorum is 3. However, there are some flavors of K8s like K3s, MicroShift and MicroK8s that are designed to run on single nodes (for edge deployments). Check out this post for further details.

what is the real use case scenario for creating new nodes ? Let's say I install kubernetes on my personal laptop, is it good practice to create multiple nodes on a single machine

You will only setup k8s on you local machine for learning purposes only. In this case, you k8s cluster will consist of only 1 node.

For production workloads, you will always use multiple servers to setup k8s clusters.

Taimoor Mirza
  • 1,093
  • 7
  • 19