Kubernetes Cluster Configurations
When creating a Kubernetes cluster, you can use KubeKey to define a configuration file (
config-sample.yaml) which contains basic information of your cluster. Refer to the following example for Kubernetes-related parameters in the configuration file.
kubernetes: version: v1.22.12 imageRepo: kubesphere clusterName: cluster.local masqueradeAll: false maxPods: 110 nodeCidrMaskSize: 24 proxyMode: ipvs network: plugin: calico calico: ipipMode: Always vxlanMode: Never vethMTU: 1440 kubePodsCIDR: 10.233.64.0/18 kubeServiceCIDR: 10.233.0.0/18 registry: registryMirrors:  insecureRegistries:  privateRegistry: "" addons: 
The below table describes the above parameters in detail.
|The Kubernetes version to be installed. If you do not specify a Kubernetes version, KubeKey v3.0.7 will install Kubernetes v1.23.10 by default. For more information, see Support Matrix.|
|The Docker Hub repository where images will be downloaded.|
|The Kubernetes cluster name.|
|The maximum number of Pods that can run on this Kubelet. It defaults to |
|The mask size for node CIDR in your cluster. It defaults to |
|The proxy mode to use. It defaults to |
|The CNI plugin to use. KubeKey installs Calico by default while you can also specify Flannel. Note that some features can only be used when Calico is adopted as the CNI plugin, such as Pod IP Pools.|
|The IPIP Mode to use for the IPv4 POOL created at startup. If it is set to a value other than |
|The VXLAN Mode to use for the IPv4 POOL created at startup. If it is set to a value other than |
|The maximum transmission unit (MTU) setting determines the largest packet size that can be transmitted through your network. It defaults to |
|A valid CIDR block for your Kubernetes Pod subnet. It should not overlap with your node subnet and your Kubernetes Services subnet.|
|A valid CIDR block for your Kubernetes Services. It should not overlap with your node subnet and your Kubernetes Pod subnet.|
|Configure a Docker registry mirror to speed up downloads. For more information, see Configure the Docker daemon.|
|Set an address of insecure image registry. For more information, see Test an insecure registry.|
|Configure a private image registry for air-gapped installation (for example, a Docker local registry or Harbor). For more information, see Air-gapped Installation on Linux.|
- * By default, KubeKey does not define these parameters in the configuration file while you can manually add them and customize their values.
addonsis used to install cloud-native add-ons (YAML or Chart). For more information, see this file.
- This page only lists part of the parameters in the configuration file created by KubeKey. For more information about other parameters, see this example file.
Was this page Helpful?
Receive the latest news, articles and updates from KubeSphere
Thanks for the feedback. If you have a specific question about how to use KubeSphere, ask it on Slack. Open an issue in the GitHub repo if you want to report a problem or suggest an improvement.