Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
themeDJango
linenumberstrue
# master
kubeadm init --image-repository registry.aliyuncs.com/google_containers --kubernetes-version=v1.23.7 --pod-network-cidr=19210.16810.0.0/16

Execute screenshot

img34pngImage RemovedImage Added

img35png

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

...

Code Block
languagebash
themeDJango
linenumberstrue
# master
kubeadm reset -f 
rm -rf ~/.kube/ 
rm -rf /etc/kubernetes/ 
rm -rf /var/lib/etcd 
rm -rf /var/etcd 


4.3 Configure the

...

cilium network

...

plugin 

Here select cilium as the network plug-in

Execute command

Code Block
languagebash
themeDJango
linenumberstrue
# 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

Execute screenshot

Image Added

Image Added

Image Added

Through the get po command above, you can see that the status of the two pods of coredns is being created. In this step, configure the calico network plug-in to make it work. Create the calico.yaml file. If the remote machine cannot download it, copy the text directly from the URL and create it manually. After applying the configuration

Execute command

Code Block
languagebash
themeDJango
linenumberstrue
# master
curl https://projectcalico.docs.tigera.io/manifests/calico.yaml -O
vi calico.yaml
kubectl apply -f calico.yaml
# loop,until all the pod is ready
kubectl get po -A

Execute screenshot

img17pngImage Removed

5 Initialize workers

...