kubeadm init's Examples

Initializes the cluster using default settings (e.g., automatically determines the API server advertise address, uses default pod and service CIDRs).

sudo kubeadm init

This is a common requirement when setting up a Cluster Network Interface (CNI) like Calico or Flannel, as they need a specific IP range for Pods.

sudo kubeadm init --pod-network-cidr=192.168.0.0/16

Explicitly tells the API server what IP address to advertise to the other nodes. Useful in multi-homed environments.

sudo kubeadm init --apiserver-advertise-address=192.168.1.100

Uses a detailed YAML configuration file for complex or advanced setups, providing greater control over every component.

sudo kubeadm init --config=kubeadm-config.yaml

Runs the initialization process without making any changes, useful for checking if all pre-requisites are met and viewing the configuration output.

sudo kubeadm init --dry-run

DevOpsSchool
Typically replies within an hour

DevOpsSchool
Hi there 👋

How can I help you?
×
Chat with Us