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 ...@@ -86,8 +86,8 @@ eval "curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontai
# install cri-o # install cri-o
eval "apt-get update" eval "apt-get update --force-yes"
eval "apt-get install cri-o cri-o-runc" eval "apt-get install cri-o cri-o-runc -y"
eval "systemctl daemon-reload" eval "systemctl daemon-reload"
eval "systemctl enable crio" eval "systemctl enable crio"
eval "systemctl start crio" eval "systemctl start crio"
...@@ -98,8 +98,7 @@ echo "Complete install CRI-O" ...@@ -98,8 +98,7 @@ echo "Complete install CRI-O"
install_k8s(){ install_k8s(){
# install k8s # install k8s
export KUBE_VERSION=v1.28 export KUBE_VERSION=v1.28
# 執行下面指令 eval "apt-get update -y"
eval "apt-get update"
# apt-transport-https may be a dummy package; if so, you can skip that package # 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" 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 ...@@ -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 # 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 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-get install -y kubelet kubeadm kubectl"
eval "apt-mark hold kubelet kubeadm kubectl" eval "apt-mark hold kubelet kubeadm kubectl"
...@@ -239,7 +238,7 @@ main(){ ...@@ -239,7 +238,7 @@ main(){
#update_system #update_system
echo "Installing" echo "Installing"
copy_host_file $1 copy_host_file $1
if [[ $2 == "cp"]]; then if [[ $2 == "cp" ]]; then
prerequisite prerequisite
install_cri install_cri
install_k8s install_k8s
......
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