Well, your question is very general. All depends on many factors, resources you want to use, how nodes will be used, for what purposes, if there will be HorizontalPodAutoscaler
/ClusterAutoscale
r, what environment you want to use, quota settings, resource limits/requirements and many more.
However, if you would go to Kubernetes documentation you will be able to check current Kubernetes version capabilities:
At v1.19, Kubernetes supports clusters with up to 5000 nodes. More specifically, we support configurations that meet all of the following criteria:
- No more than 5000 nodes
- No more than 150000 total pods
- No more than 300000 total containers
- No more than 100 pods per node
If you would like to run Kubernetes on local environment, you would need to read a lot about kubeadm and Highly Available clusters.
However, if you would decide to use cloud environment like Google Kubernetes Engine
, Amazon EKS
, Azure Kubernetes Service
, OpenShift
, etc; you will be able to find those requirements in specific cloud provider documentation.
In Kubernetes documentation
you will be able to find some general information for Size of master and master components in GKE and AWS
On GCE/Google Kubernetes Engine, and AWS, kube-up automatically
configures the proper VM size for your master depending on the number
of nodes in your cluster. On other providers, you will need to
configure it manually. For reference, the sizes we use on GCE are:
- 1-5 nodes: n1-standard-1
- 6-10 nodes: n1-standard-2
- 11-100 nodes: n1-standard-4
- 101-250 nodes: n1-standard-8
- 251-500 nodes: n1-standard-16
- more than 500 nodes: n1-standard-32
And the sizes we use on AWS are
- 1-5 nodes: m3.medium
- 6-10 nodes: m3.large
- 11-100 nodes: m3.xlarge
- 101-250 nodes: m3.2xlarge
- 251-500 nodes: c4.4xlarge
- more than 500 nodes: c4.8xlarge
It's also worth to mention that some cloud environments (like GKE) master node are managed by cloud provider
. Therefore you don't need to worry about master but you can focus on other aspects like HPA, CA or Network configuration
.
As last thing you can read Kubernetes Capacity Planning article.