Versions Compared

Key

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

Table of Contents

@MIGU 补充应用安装相关部分

...

Code Block
languagebash
themeDJango
linenumberstrue
cat <<EOF> /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.ip_forward = 1
EOF
sysctl -p /etc/sysctl.d/k8s.conf

Execute screenshot

img22pngImage RemovedImage Added

1.7 Make sure the time zone and time are correct

...

Code Block
languagebash
themeDJango
linenumberstrue
timedatectl set-timezone Asia/Shanghai
systemctl restart rsyslog

Execute screenshot

img23pngImage RemovedImage Added

2 Install docker 

...

Code Block
languagebash
themeDJango
linenumberstrue
yum -y remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine docker-ce docker-ce-cli 

Execute screenshot

img24pngImage Removed img26pngImage RemovedImage Added

Image Added

2.2 Install docker

...

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

img35png

Let kubectl take effect

Execute command

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

...

Here select cilium as the network plugin

Confirm that your current default version of the kernel is above 4.9

Check the current kernel version

Execute command

Code Block
languagebash
themeDJango
linenumberstrue
# master  
uname -sr

...

7 Propagate a deployment by Karmada


Before propagating a deployment, make sure the worker cluster is already working properly

In the following steps, we are going to propagate a deployment by Karmada. We use the installation of nginx as an example


7.1 Join a worker/member cluster to karmada control plane

Here we add the working node cluster through push mode


Execute command


Code Block
languagebash
themeDJango
linenumberstrue
kubectl karmada join worker-cluster --cluster-kubeconfig=prod --cluster-context=prod

...