...
Pull the image of version 1.23.7, initialize the master node, and configure the calico network plug-in plugin for the master node
4.1 Pull the k8s image Pull the k8s image
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# master kubeadm init --image-repository registry.aliyuncs.com/google_containers --kubernetes-version=v1.23.7 --pod-network-cidr=10.10.0.0/16 |
Execute screenshot
You can see that the prompt initialization is successful, and at the end of the prompt, the way to join the worker node is provided. The prompt executes the following command to use kubectl normally
Execute command
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# master mkdir -p $HOME/.kube sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config |
...
Note that if an error occurs and you need to re-initreinit, you need to execute the following statement first to ensure that kubeadm is re-executed normally
...
Here select cilium as the network plug-inplugin
Execute command
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# master curl -L --remote-name-all https://github.com/cilium/cilium-cli/releases/latest/download/cilium-linux-amd64.tar.gz tar -zxvf cilium-linux-amd64.tar.gz mv cilium /usr/local/bin/ cilium version cilium install |
...