Versions Compared

Key

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

...

Code Block
languagebash
themeDJango
linenumberstrue
yum -y install docker-ce

Execute screenshot

img13pngImage RemovedImage Added

2.3 Set docker to boot and confirm docker status

...

Code Block
languagebash
themeDJango
linenumberstrue
systemctl enable docker
systemctl start docker
systemctl status docker

Execute screenshot

img12pngImage RemovedImage Added

2.4 Configure the driver of docker's cgroup

...

Check the current configuration, if it is the system in the figure below, skip the follow-up and go directly to the third section

Execute screenshot

img27pngImage RemovedImage Added

If it is cgroupfs, add the following statement

...

Code Block
languagebash
themeDJango
linenumberstrue
systemctl daemon-reload && systemctl restart docker
docker info | grep -i cgroup

Image Added

3 Install k8s basic components

...

Code Block
languagebash
themeDJango
linenumberstrue
yum list installed | grep kube

Execute screenshot

img28pngImage RemovedImage Added

3.2 Install kubelet kubeadm kubectl version 1.23.7

...

Code Block
languagebash
themeDJango
linenumberstrue
yum -y install kubelet-1.23.7 kubeadm-1.23.7 kubectl-1.23.7

Execute screenshot

Image Added

Image Addedimg14pngImage Removed

3.3 Verify installation

...

Code Block
languagebash
themeDJango
linenumberstrue
kubelet --version
kubeadm version
kubectl version

Execute screenshot

img31pngImage RemovedImage Added

4 Initialize the master

...

Code Block
languagebash
themeDJango
linenumberstrue
# master
kubeadm config images list --kubernetes-version=v1.23.7 |sed -e 's/^/docker pull /g' -e 's#k8s.gcr.io#registry.aliyuncs.com/google_containers#g' |sh -x
docker pull registry.aliyuncs.com/google_containers/coredns:v1.8.6  
docker images 

Execute screenshot

img32pngImage RemovedImage Added

img33pngImage RemovedImage Added

Please make sure that the above 7 images have been pulled down

...

Code Block
languagebash
themeDJango
linenumberstrue
# master
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
kubectl get po -A

Execute screenshot

img36pngImage RemovedImage Added


We can see that the coredns is not ready, so we need configure the network plugin

...

Code Block
languagebash
themeDJango
linenumberstrue
# master
kubeadm token create --print-join-command

Execute screenshot

img20pngImage RemovedImage Added

5.2 Join the master node

...

When you have the join statement, copy it and execute it on the worker node, you can see

Execute screenshot

img19pngImage Removed


Note that if an error occurs and you need to re-init, you need to execute the following statement first to ensure that kubeadm is re-executed normally

...

Code Block
languagebash
themeDJango
linenumberstrue
# master
kubectl get nodes

Execute screenshot

img18pngImage RemovedImage Added

6 Install karmada

...