--https://share.google/aimode/CpQCKYetuCONQRZeM
To start a Kubernetes master node (control plane), you use kubeadm init. kubectl is only a command-line tool used to manage the cluster after it is running, not to start the node itself. Make sure swap is disabled and a container runtime (like containerd) is installed. [1, 2, 3]
Initialize the Master Node
Log in to your designated master node and run the initialization command: []
bash
sudo kubeadm init --pod-network-cidr=192.168.0.0/16
குறியீட்டைக் கவனமாகப் பயன்படுத்துங்கள்.
(You can adjust the
--pod-network-cidr flag based on the network plugin you plan to use later). []Configure kubectl Access
Once the initialization finishes successfully, copy the generated configuration commands from the output terminal to let
kubectl work for your user: []bash
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
குறியீட்டைக் கவனமாகப் பயன்படுத்துங்கள்.
Install a Pod Network Add-on
Your master node will show a
Not Ready status until you deploy a container network interface (CNI) plugin (such as Calico, Flannel, or Weave). For example, to apply a network plugin: [1]bash
kubectl apply -f <pod-network-yaml-url>
குறியீட்டைக் கவனமாகப் பயன்படுத்துங்கள்.
If you'd like, I can help you with:
- Choosing and installing a specific pod network (like Calico or Flannel)
- Getting the join command for your worker nodes
- Troubleshooting pre-check errors during
kubeadm init
No comments:
Post a Comment