Commit ee61d2cd authored by Wen Wei Li's avatar Wen Wei Li

update k8s-install

parent b35572c2
......@@ -86,8 +86,8 @@ eval "curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontai
# install cri-o
eval "apt-get update"
eval "apt-get install cri-o cri-o-runc"
eval "apt-get update --force-yes"
eval "apt-get install cri-o cri-o-runc -y"
eval "systemctl daemon-reload"
eval "systemctl enable crio"
eval "systemctl start crio"
......@@ -98,8 +98,7 @@ echo "Complete install CRI-O"
install_k8s(){
# install k8s
export KUBE_VERSION=v1.28
# 執行下面指令
eval "apt-get update"
eval "apt-get update -y"
# apt-transport-https may be a dummy package; if so, you can skip that package
eval "apt-get install -y apt-transport-https ca-certificates curl gpg"
......@@ -107,7 +106,7 @@ eval "curl -fsSL https://pkgs.k8s.io/core:/stable:/$KUBE_VERSION/deb/Release.key
# This overwrites any existing configuration in /etc/apt/sources.list.d/kubernetes.list
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/$KUBE_VERSION/deb/ /" | sudo tee /etc/apt/sources.list.d/kubernetes.list
eval "apt-get update"
eval "apt-get update -y"
eval "apt-get install -y kubelet kubeadm kubectl"
eval "apt-mark hold kubelet kubeadm kubectl"
......@@ -239,10 +238,10 @@ main(){
#update_system
echo "Installing"
copy_host_file $1
if [[ $2 == "cp"]]; then
if [[ $2 == "cp" ]]; then
prerequisite
install_cri
install_k8s
install_k8s
copy_k8s_config
else
add_to_master
......
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