2023-04-26 19:57:49 +08:00
|
|
|
sudo systemctl disable --now firewalld
|
|
|
|
setenforce 0
|
|
|
|
sed -i "s/^SELINUX=.*/SELINUX=disabled/g" /etc/selinux/config
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf
|
|
|
|
br_netfilter
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
|
|
|
|
net.bridge.bridge-nf-call-ip6tables = 1
|
|
|
|
net.bridge.bridge-nf-call-iptables = 1
|
|
|
|
EOF
|
|
|
|
sudo sysctl --system
|
|
|
|
|
2023-08-22 18:54:45 +08:00
|
|
|
# 关闭swap
|
|
|
|
sudo swapoff -a
|
|
|
|
sed -i 's/.*swap.*/#&/' /etc/fstab
|
|
|
|
|
2023-04-26 19:57:49 +08:00
|
|
|
cd ./docker && bash ./install.sh && cd ..
|
|
|
|
cd ./kubeadm && bash ./install.sh && cd ..
|
|
|
|
|