Commit 0422a180 authored by Wen Wei Li's avatar Wen Wei Li

refactor

parent ab286105
......@@ -26,7 +26,9 @@ cgroup=`ls /sys/fs/cgroup/cgroup.controllers`
}
install_k8s(){
#install_k8s(){
prerequisite(){
touch /etc/modules-load.d/k8s.conf
cat > /etc/modules-load.d/k8s.conf << EOF
overlay
......@@ -54,8 +56,9 @@ net.ipv4.tcp_max_syn_backlog = 2048
net.ipv4.tcp_synack_retries = 2
vm.swappiness = 0
EOF
}
install_cri(){
sysctl --system
echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/backports.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9
......@@ -87,7 +90,9 @@ eval "systemctl enable crio"
eval "systemctl start crio"
echo "Complete install CRI-O"
}
install_k8s(){
# install k8s
export KUBE_VERSION=v1.28
# 執行下面指令
......@@ -219,6 +224,8 @@ main(){
if check_root; then
#update_system
copy_host_file $1
prerequisite
install_cri
install_k8s
exit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment