diff --git a/cicd/k8s-calico-incluster/configs/config b/cicd/k8s-calico-incluster/configs/config deleted file mode 100644 index fc66b8aed..000000000 --- a/cicd/k8s-calico-incluster/configs/config +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -clusters: -- cluster: - certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUMvakNDQWVhZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJek1EY3pNREV6TURVek1sb1hEVE16TURjeU56RXpNRFV6TWxvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTVNyClltV0M3Q0lSYlZFZy92M0FZUk5rRTZnUk5CQ2k3MThCMitHbUllVkQ4c2d5aXoxdWprdDZnbDcwQXhIRDkwSlUKcnVzSnFTc2ZvdDZ3YWJodU5MR3pMdy9ZK0xwZlRNMG5pRmorM3NlVlZiTExQOWxlRUx0Y2R5MnNIWDRQSU5KNApHcmNWM0lETjYrNGZOUWZkT1pjcGtIMjVkMmFKa01sM1YrdTFUbExTK0VSckRhQnNpOTJESXFkb0wxdlhwbm8xCjh6TnpYV2J3M1EyQ1dldWlOaW11eHNIWDM0MlpzRnNJY2FwYWhqa0MxVFZCbkNVOVowSXJSR2pVaW4rbkwvRVcKQUp2SHhCVEVMWkFmd1VkcG10ODBIcGFGVDNZMlcxYW1VWmR2b2w1V0RUaE83T3R4eGpUeTVrSXAwVlhIL1Q2WApRalRLb0RIUERsUWVNc01aQ1BjQ0F3RUFBYU5aTUZjd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0hRWURWUjBPQkJZRUZFWFMrWUs1ampsOWNSc3hPQW9qNktMWTRkVGpNQlVHQTFVZEVRUU8KTUF5Q0NtdDFZbVZ5Ym1WMFpYTXdEUVlKS29aSWh2Y05BUUVMQlFBRGdnRUJBQ2h1MFhnZ1d1MkdqZStId3BTQwpSaE5kbUVwWnVPSjcyVlhrUGlsTUxJeHZ6Rys1NG1PbWZPOFNjRTJqaitTVG90VXk2N1hvMklMU1loNHpydFRXCitPcnFYMmJqaC9rZTRhOU5MSTJORjlmc1Z6ZS9YVElRQ0Uwbnlkb21lOC91b0s2b29DRGc1bm5FM1Y0NXFiRE0KdVJ4VGU5dUkvV1J1ZHVuSW95MXNPTHh2My9yZE1DeVZvRkljdm9ZazlES2NBU1F5Z09CRE1uaEc4RHBrZE44Ngo5eW01SDdYMVBvNkZVVCt0TCtKOHlmRFRhc0VXRDhRODRuVmRVckE3TGdtNnZYbmFGeTNCQ3dJUXZGRjNhbTlPCnZ3ZzJ5bzdPZ1RmdU9YUWpjVHZNWmpmNUp4OGlKQXc4WkN1aGkxVlpjQitpWnNDb2I1cUxHdENnbWxNMlNpTmMKaTVnPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg== - server: https://192.168.80.10:6443 - name: kubernetes -contexts: -- context: - cluster: kubernetes - user: kubernetes-admin - name: kubernetes-admin@kubernetes -current-context: kubernetes-admin@kubernetes -kind: Config -preferences: {} -users: -- name: kubernetes-admin - user: - client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURJVENDQWdtZ0F3SUJBZ0lJWVF5Tkszb3lBa2N3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB5TXpBM016QXhNekExTXpKYUZ3MHlOREEzTWpreE16QTFNelZhTURReApGekFWQmdOVkJBb1REbk41YzNSbGJUcHRZWE4wWlhKek1Sa3dGd1lEVlFRREV4QnJkV0psY201bGRHVnpMV0ZrCmJXbHVNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQX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3Tk9pa1VBa1RUek52ZWxsRW9yK2RVWHRyVUlKdmtKT2xBbmZJekMKMlpRM3p4YzRpTVd1a3hHc2Z2VzFIZngxOUdBNzBVWXZkNFVab09mYjVRYWtBaGh2WUh6VEdlNnZ1VXBoZS9KTQo5QXdwQ3YzcEg5TW1VWk5wbzlhcWhQTGNnUzd5Uy9Xc1pVbFlpUzNrRUtYOUhOcUtiMHVsCi0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg== diff --git a/cicd/k8s-calico-incluster/configs/join.sh b/cicd/k8s-calico-incluster/configs/join.sh deleted file mode 100755 index 17a251f0e..000000000 --- a/cicd/k8s-calico-incluster/configs/join.sh +++ /dev/null @@ -1 +0,0 @@ -kubeadm join 192.168.80.10:6443 --token wxki6c.cifh2d82k592rpwf --discovery-token-ca-cert-hash sha256:f581308b2a8fb3647d7e1297d2dac741529bb84c711d3ae9193ab4574fcb3aae diff --git a/cicd/k8s-calico-incluster/node_scripts/common.sh b/cicd/k8s-calico-incluster/node_scripts/common.sh index c01ad688f..ded6b8b5d 100644 --- a/cicd/k8s-calico-incluster/node_scripts/common.sh +++ b/cicd/k8s-calico-incluster/node_scripts/common.sh @@ -15,6 +15,7 @@ cat </dev/null; echo "@reboot /sbin/swapoff -a") | crontab - || true sudo apt-get update -y -# Install CRI-O Runtime -VERSION="$(echo ${KUBERNETES_VERSION} | grep -oE '[0-9]+\.[0-9]+')" -CRIO_VERSION=1.27 -# Create the .conf file to load the modules at bootup -cat <> /etc/default/crio << EOF -${ENVIRONMENT} -EOF -sudo systemctl daemon-reload -sudo systemctl enable crio --now - -echo "CRI runtime installed successfully" - -sudo apt-get update sudo apt-get install -y apt-transport-https ca-certificates curl gpg -curl -fsSL https://pkgs.k8s.io/core:/stable:/v$VERSION/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg +curl -fsSL https://pkgs.k8s.io/core:/stable:/v$VERSION/deb/Release.key | sudo gpg --no-tty --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v'$VERSION'/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list sudo apt-get update -y diff --git a/cicd/k8s-calico-incluster/node_scripts/master.sh b/cicd/k8s-calico-incluster/node_scripts/master.sh index bcc757853..13db17a17 100644 --- a/cicd/k8s-calico-incluster/node_scripts/master.sh +++ b/cicd/k8s-calico-incluster/node_scripts/master.sh @@ -6,10 +6,6 @@ set -euxo pipefail NODENAME=$(hostname -s) -sudo kubeadm config images pull - -echo "Preflight Check Passed: Downloaded All Required Images" - #sudo kubeadm init --apiserver-advertise-address=$CONTROL_IP --apiserver-cert-extra-sans=$CONTROL_IP --pod-network-cidr=$POD_CIDR --service-cidr=$SERVICE_CIDR --node-name "$NODENAME" --ignore-preflight-errors Swap sudo kubeadm init --ignore-preflight-errors Swap --config /vagrant/yaml/kubeadm-config.yaml @@ -33,7 +29,8 @@ cp -i /etc/kubernetes/admin.conf $config_path/config touch $config_path/join.sh chmod +x $config_path/join.sh -kubeadm token create --print-join-command > $config_path/join.sh +join_cmd=`kubeadm token create --print-join-command` +echo $join_cmd "--cri-socket /var/run/cri-dockerd.sock" > $config_path/join.sh # Install Calico Network Plugin diff --git a/cicd/k8s-calico-incluster/yaml/kubeadm-config.yaml b/cicd/k8s-calico-incluster/yaml/kubeadm-config.yaml index 245a62553..20a7207ac 100644 --- a/cicd/k8s-calico-incluster/yaml/kubeadm-config.yaml +++ b/cicd/k8s-calico-incluster/yaml/kubeadm-config.yaml @@ -14,6 +14,7 @@ nodeRegistration: imagePullPolicy: IfNotPresent name: master taints: null + criSocket: unix:///var/run/cri-dockerd.sock --- apiVersion: kubeadm.k8s.io/v1beta3 certificatesDir: /etc/kubernetes/pki @@ -67,3 +68,7 @@ metricsBindAddress: 127.0.0.1:10249 nodePortAddresses: null oomScoreAdj: -999 portRange: "" +--- +kind: KubeletConfiguration +apiVersion: kubelet.config.k8s.io/v1beta1 +cgroupDriver: systemd diff --git a/cicd/k8s-calico-ipvs/configs/config b/cicd/k8s-calico-ipvs/configs/config deleted file mode 100644 index 752bd5ddf..000000000 --- a/cicd/k8s-calico-ipvs/configs/config +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -clusters: -- cluster: - certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUMvakNDQWVhZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJek1Ea3dNVEF5TkRZek9Gb1hEVE16TURneU9UQXlORFl6T0Zvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBSzhTCkZwZTh0UVlQOVdvVTZYNVAwanBuSHMxM1hYQ3NnVk03QjJDRG5NWGpFeEExbm9xWElybk1YbFlmVTZ2blhLbSsKUDRqRGFUM0puK1hxaHFLUml3dmkra01lL1FUSVJiUThwVmVtUnBXaDB0dWNPbTJmeno0UkQxeS83ZmJHd0VGWgpCM3BRNm9CSVdXR0F3VERISDdoU0RlU0czdnhFRzdMdVNnUElxYWM1MEpkVWYrVXJ5SUlzdTlnYkJZN2NGcjhzCm03YmFTUkF5NkZyWlRveTBPRW1sT2NWWTBWYUpZdWpPdmVkTk5KRkw1RTlCenArbjA0UVcwVjRRd0NDaUIwQ3EKRjJTdWo4aDRSZWk0VTE5WmkvN2FyYyt5MTZUbURXem00Y0FRa05DWEY4dExYRTlMb3hUVEgvdGJFUHhORUk0KwpDT1BGZ0puVjd4R0l2QVh5UEVzQ0F3RUFBYU5aTUZjd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0hRWURWUjBPQkJZRUZJTHBkU2YrYzhZS0tlb0ZQVk1pUFZQWVREaUdNQlVHQTFVZEVRUU8KTUF5Q0NtdDFZbVZ5Ym1WMFpYTXdEUVlKS29aSWh2Y05BUUVMQlFBRGdnRUJBS2JtYnBzTlF4UlFvTjRuMnUxOQo5Ump0WTJvMmUvSFA3NCthdlVKRitqM3FqRGFSdnhBS3JFRVNLMGJ1WmpFNzdQcmNtRnB3UFRmQ2wxazRDV2hyCnhPM1U0a2tXamQrWXlGc3BVYjJIaUE5R3ZhTXczWDBxaWtDRGZjNGxIaExXOWtRMWNpUHNyMmhPQURyZ2hNVUgKWWxEM2RBSnRuZzRXVm5TU2NiODk3Vm9DUU56NExlNi9WaWszRXA2ZG9pb1ZQbTZsNW9JNlU1ODJPMlorSGkwYgo4bzgxK3QxRVBvZ01tQkJWMVdWSzd4UkVLRFJuMmgzQjY4NHc0TGgyNkdyQ1NZVGlwRGhjUGJmRFJvS2o4aEFZClM0YWFRSDJLZ2kvdnkvY0VPVXc1Sk9VdmZBWUlmQ0R1d3k4K1NlOUc5NStaZStoTGdUcHkvZ3hTMHNhN20xTVQKM3FRPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg== - server: https://192.168.80.10:6443 - name: kubernetes -contexts: -- context: - cluster: kubernetes - user: kubernetes-admin - name: kubernetes-admin@kubernetes -current-context: kubernetes-admin@kubernetes -kind: Config -preferences: {} -users: -- name: kubernetes-admin - user: - client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURJVENDQWdtZ0F3SUJBZ0lJTjd6VjBzQnlrQUF3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB5TXpBNU1ERXdNalEyTXpoYUZ3MHlOREE0TXpFd01qUTJOREZhTURReApGekFWQmdOVkJBb1REbk41YzNSbGJUcHRZWE4wWlhKek1Sa3dGd1lEVlFRREV4QnJkV0psY201bGRHVnpMV0ZrCmJX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FEZSt1dnFPQ2F3dk9GQ2J2N3IyUXdIN3pHLzJMdXJqMHd0UENYd09IbXFiWWpvSnhEZGlyd2oKc0JsOXUxTzNLVkR5TmJGS2NHOUFyVmlEU3JOUFkrNEdiZCtqYTlheHFVUGZHU3pBWDlwRUdDcmdacHRrK0d0Ngo5SFBsbkFsYXpzTWgyUGhxSlN4U3ZRQ2h3QXk0cmZMdlltMVhkYjhaYnkrVndCTlZVL21obXc9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo= diff --git a/cicd/k8s-calico-ipvs/configs/join.sh b/cicd/k8s-calico-ipvs/configs/join.sh deleted file mode 100755 index 0cde2a766..000000000 --- a/cicd/k8s-calico-ipvs/configs/join.sh +++ /dev/null @@ -1 +0,0 @@ -kubeadm join 192.168.80.10:6443 --token erzh6n.ysnbfgbxinfum5ps --discovery-token-ca-cert-hash sha256:43c9a9c2b22f053d87a0e11df980c04f8171778049609a62d29db794e30ece03 diff --git a/cicd/k8s-calico-ipvs/node_scripts/common.sh b/cicd/k8s-calico-ipvs/node_scripts/common.sh index c01ad688f..ded6b8b5d 100644 --- a/cicd/k8s-calico-ipvs/node_scripts/common.sh +++ b/cicd/k8s-calico-ipvs/node_scripts/common.sh @@ -15,6 +15,7 @@ cat </dev/null; echo "@reboot /sbin/swapoff -a") | crontab - || true sudo apt-get update -y -# Install CRI-O Runtime -VERSION="$(echo ${KUBERNETES_VERSION} | grep -oE '[0-9]+\.[0-9]+')" -CRIO_VERSION=1.27 -# Create the .conf file to load the modules at bootup -cat <> /etc/default/crio << EOF -${ENVIRONMENT} -EOF -sudo systemctl daemon-reload -sudo systemctl enable crio --now - -echo "CRI runtime installed successfully" - -sudo apt-get update sudo apt-get install -y apt-transport-https ca-certificates curl gpg -curl -fsSL https://pkgs.k8s.io/core:/stable:/v$VERSION/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg +curl -fsSL https://pkgs.k8s.io/core:/stable:/v$VERSION/deb/Release.key | sudo gpg --no-tty --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v'$VERSION'/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list sudo apt-get update -y diff --git a/cicd/k8s-calico-ipvs/node_scripts/master.sh b/cicd/k8s-calico-ipvs/node_scripts/master.sh index 9e65ff335..eaa7097cb 100644 --- a/cicd/k8s-calico-ipvs/node_scripts/master.sh +++ b/cicd/k8s-calico-ipvs/node_scripts/master.sh @@ -6,10 +6,6 @@ set -euxo pipefail NODENAME=$(hostname -s) -sudo kubeadm config images pull - -echo "Preflight Check Passed: Downloaded All Required Images" - #sudo kubeadm init --apiserver-advertise-address=$CONTROL_IP --apiserver-cert-extra-sans=$CONTROL_IP --pod-network-cidr=$POD_CIDR --service-cidr=$SERVICE_CIDR --node-name "$NODENAME" --ignore-preflight-errors Swap sudo kubeadm init --ignore-preflight-errors Swap --config /vagrant/yaml/kubeadm-config.yaml @@ -33,7 +29,8 @@ cp -i /etc/kubernetes/admin.conf $config_path/config touch $config_path/join.sh chmod +x $config_path/join.sh -kubeadm token create --print-join-command > $config_path/join.sh +join_cmd=`kubeadm token create --print-join-command` +echo $join_cmd "--cri-socket /var/run/cri-dockerd.sock" > $config_path/join.sh # Install Calico Network Plugin diff --git a/cicd/k8s-calico-ipvs/yaml/kubeadm-config.yaml b/cicd/k8s-calico-ipvs/yaml/kubeadm-config.yaml index 79d05055f..2848ae7a0 100644 --- a/cicd/k8s-calico-ipvs/yaml/kubeadm-config.yaml +++ b/cicd/k8s-calico-ipvs/yaml/kubeadm-config.yaml @@ -14,6 +14,7 @@ nodeRegistration: imagePullPolicy: IfNotPresent name: master taints: null + criSocket: unix:///var/run/cri-dockerd.sock --- apiVersion: kubeadm.k8s.io/v1beta3 certificatesDir: /etc/kubernetes/pki @@ -67,3 +68,7 @@ metricsBindAddress: 127.0.0.1:10249 nodePortAddresses: null oomScoreAdj: -999 portRange: "" +--- +kind: KubeletConfiguration +apiVersion: kubelet.config.k8s.io/v1beta1 +cgroupDriver: systemd diff --git a/cicd/k8s-calico-ipvs2-ha-ka-sync/node_scripts/common.sh b/cicd/k8s-calico-ipvs2-ha-ka-sync/node_scripts/common.sh index 34035effc..545950530 100644 --- a/cicd/k8s-calico-ipvs2-ha-ka-sync/node_scripts/common.sh +++ b/cicd/k8s-calico-ipvs2-ha-ka-sync/node_scripts/common.sh @@ -18,6 +18,7 @@ cat </dev/null; echo "@reboot /sbin/swapoff -a") | crontab - || true sudo apt-get update -y -# Install CRI-O Runtime -VERSION="$(echo ${KUBERNETES_VERSION} | grep -oE '[0-9]+\.[0-9]+')" -CRIO_VERSION=1.27 -# Create the .conf file to load the modules at bootup -cat <> /etc/default/crio << EOF -${ENVIRONMENT} -EOF -sudo systemctl daemon-reload -sudo systemctl enable crio --now - -echo "CRI runtime installed successfully" - -sudo apt-get update sudo apt-get install -y apt-transport-https ca-certificates curl gpg -curl -fsSL https://pkgs.k8s.io/core:/stable:/v$VERSION/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg +curl -fsSL https://pkgs.k8s.io/core:/stable:/v$VERSION/deb/Release.key | sudo gpg --no-tty --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v'$VERSION'/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list sudo apt-get update -y diff --git a/cicd/k8s-calico-ipvs2-ha-ka-sync/node_scripts/master.sh b/cicd/k8s-calico-ipvs2-ha-ka-sync/node_scripts/master.sh index 41793b5fa..2d3eb1efd 100644 --- a/cicd/k8s-calico-ipvs2-ha-ka-sync/node_scripts/master.sh +++ b/cicd/k8s-calico-ipvs2-ha-ka-sync/node_scripts/master.sh @@ -6,10 +6,6 @@ set -euxo pipefail NODENAME=$(hostname -s) -sudo kubeadm config images pull - -echo "Preflight Check Passed: Downloaded All Required Images" - #sudo kubeadm init --apiserver-advertise-address=$CONTROL_IP --apiserver-cert-extra-sans=$CONTROL_IP --pod-network-cidr=$POD_CIDR --service-cidr=$SERVICE_CIDR --node-name "$NODENAME" --ignore-preflight-errors Swap sudo kubeadm init --ignore-preflight-errors Swap --config /vagrant/yaml/kubeadm-config.yaml @@ -33,7 +29,8 @@ cp -i /etc/kubernetes/admin.conf $config_path/config touch $config_path/join.sh chmod +x $config_path/join.sh -kubeadm token create --print-join-command > $config_path/join.sh +join_cmd=`kubeadm token create --print-join-command` +echo $join_cmd "--cri-socket /var/run/cri-dockerd.sock" > $config_path/join.sh # Install Calico Network Plugin diff --git a/cicd/k8s-calico-ipvs2-ha-ka-sync/yaml/kubeadm-config.yaml b/cicd/k8s-calico-ipvs2-ha-ka-sync/yaml/kubeadm-config.yaml index 245a62553..20a7207ac 100644 --- a/cicd/k8s-calico-ipvs2-ha-ka-sync/yaml/kubeadm-config.yaml +++ b/cicd/k8s-calico-ipvs2-ha-ka-sync/yaml/kubeadm-config.yaml @@ -14,6 +14,7 @@ nodeRegistration: imagePullPolicy: IfNotPresent name: master taints: null + criSocket: unix:///var/run/cri-dockerd.sock --- apiVersion: kubeadm.k8s.io/v1beta3 certificatesDir: /etc/kubernetes/pki @@ -67,3 +68,7 @@ metricsBindAddress: 127.0.0.1:10249 nodePortAddresses: null oomScoreAdj: -999 portRange: "" +--- +kind: KubeletConfiguration +apiVersion: kubelet.config.k8s.io/v1beta1 +cgroupDriver: systemd diff --git a/cicd/k8s-calico-ipvs2/node_scripts/common.sh b/cicd/k8s-calico-ipvs2/node_scripts/common.sh index c01ad688f..ded6b8b5d 100644 --- a/cicd/k8s-calico-ipvs2/node_scripts/common.sh +++ b/cicd/k8s-calico-ipvs2/node_scripts/common.sh @@ -15,6 +15,7 @@ cat </dev/null; echo "@reboot /sbin/swapoff -a") | crontab - || true sudo apt-get update -y -# Install CRI-O Runtime -VERSION="$(echo ${KUBERNETES_VERSION} | grep -oE '[0-9]+\.[0-9]+')" -CRIO_VERSION=1.27 -# Create the .conf file to load the modules at bootup -cat <> /etc/default/crio << EOF -${ENVIRONMENT} -EOF -sudo systemctl daemon-reload -sudo systemctl enable crio --now - -echo "CRI runtime installed successfully" - -sudo apt-get update sudo apt-get install -y apt-transport-https ca-certificates curl gpg -curl -fsSL https://pkgs.k8s.io/core:/stable:/v$VERSION/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg +curl -fsSL https://pkgs.k8s.io/core:/stable:/v$VERSION/deb/Release.key | sudo gpg --no-tty --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v'$VERSION'/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list sudo apt-get update -y diff --git a/cicd/k8s-calico-ipvs2/node_scripts/master.sh b/cicd/k8s-calico-ipvs2/node_scripts/master.sh index 41793b5fa..2d3eb1efd 100644 --- a/cicd/k8s-calico-ipvs2/node_scripts/master.sh +++ b/cicd/k8s-calico-ipvs2/node_scripts/master.sh @@ -6,10 +6,6 @@ set -euxo pipefail NODENAME=$(hostname -s) -sudo kubeadm config images pull - -echo "Preflight Check Passed: Downloaded All Required Images" - #sudo kubeadm init --apiserver-advertise-address=$CONTROL_IP --apiserver-cert-extra-sans=$CONTROL_IP --pod-network-cidr=$POD_CIDR --service-cidr=$SERVICE_CIDR --node-name "$NODENAME" --ignore-preflight-errors Swap sudo kubeadm init --ignore-preflight-errors Swap --config /vagrant/yaml/kubeadm-config.yaml @@ -33,7 +29,8 @@ cp -i /etc/kubernetes/admin.conf $config_path/config touch $config_path/join.sh chmod +x $config_path/join.sh -kubeadm token create --print-join-command > $config_path/join.sh +join_cmd=`kubeadm token create --print-join-command` +echo $join_cmd "--cri-socket /var/run/cri-dockerd.sock" > $config_path/join.sh # Install Calico Network Plugin diff --git a/cicd/k8s-calico-ipvs2/yaml/kubeadm-config.yaml b/cicd/k8s-calico-ipvs2/yaml/kubeadm-config.yaml index 245a62553..20a7207ac 100644 --- a/cicd/k8s-calico-ipvs2/yaml/kubeadm-config.yaml +++ b/cicd/k8s-calico-ipvs2/yaml/kubeadm-config.yaml @@ -14,6 +14,7 @@ nodeRegistration: imagePullPolicy: IfNotPresent name: master taints: null + criSocket: unix:///var/run/cri-dockerd.sock --- apiVersion: kubeadm.k8s.io/v1beta3 certificatesDir: /etc/kubernetes/pki @@ -67,3 +68,7 @@ metricsBindAddress: 127.0.0.1:10249 nodePortAddresses: null oomScoreAdj: -999 portRange: "" +--- +kind: KubeletConfiguration +apiVersion: kubelet.config.k8s.io/v1beta1 +cgroupDriver: systemd diff --git a/cicd/k8s-calico-ipvs3-ha/node_scripts/common.sh b/cicd/k8s-calico-ipvs3-ha/node_scripts/common.sh index c01ad688f..ded6b8b5d 100644 --- a/cicd/k8s-calico-ipvs3-ha/node_scripts/common.sh +++ b/cicd/k8s-calico-ipvs3-ha/node_scripts/common.sh @@ -15,6 +15,7 @@ cat </dev/null; echo "@reboot /sbin/swapoff -a") | crontab - || true sudo apt-get update -y -# Install CRI-O Runtime -VERSION="$(echo ${KUBERNETES_VERSION} | grep -oE '[0-9]+\.[0-9]+')" -CRIO_VERSION=1.27 -# Create the .conf file to load the modules at bootup -cat <> /etc/default/crio << EOF -${ENVIRONMENT} -EOF -sudo systemctl daemon-reload -sudo systemctl enable crio --now - -echo "CRI runtime installed successfully" - -sudo apt-get update sudo apt-get install -y apt-transport-https ca-certificates curl gpg -curl -fsSL https://pkgs.k8s.io/core:/stable:/v$VERSION/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg +curl -fsSL https://pkgs.k8s.io/core:/stable:/v$VERSION/deb/Release.key | sudo gpg --no-tty --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v'$VERSION'/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list sudo apt-get update -y diff --git a/cicd/k8s-calico-ipvs3-ha/node_scripts/master.sh b/cicd/k8s-calico-ipvs3-ha/node_scripts/master.sh index a5cdecaac..d4b836aef 100644 --- a/cicd/k8s-calico-ipvs3-ha/node_scripts/master.sh +++ b/cicd/k8s-calico-ipvs3-ha/node_scripts/master.sh @@ -6,10 +6,6 @@ set -euxo pipefail NODENAME=$(hostname -s) -sudo kubeadm config images pull - -echo "Preflight Check Passed: Downloaded All Required Images" - #sudo kubeadm init --apiserver-advertise-address=$CONTROL_IP --apiserver-cert-extra-sans=$CONTROL_IP --pod-network-cidr=$POD_CIDR --service-cidr=$SERVICE_CIDR --node-name "$NODENAME" --ignore-preflight-errors Swap sudo kubeadm init --ignore-preflight-errors Swap --config /vagrant/yaml/kubeadm-config.yaml @@ -33,7 +29,8 @@ cp -i /etc/kubernetes/admin.conf $config_path/config touch $config_path/join.sh chmod +x $config_path/join.sh -kubeadm token create --print-join-command > $config_path/join.sh +join_cmd=`kubeadm token create --print-join-command` +echo $join_cmd "--cri-socket /var/run/cri-dockerd.sock" > $config_path/join.sh # Install Calico Network Plugin diff --git a/cicd/k8s-calico-ipvs3-ha/yaml/kubeadm-config.yaml b/cicd/k8s-calico-ipvs3-ha/yaml/kubeadm-config.yaml index 245a62553..20a7207ac 100644 --- a/cicd/k8s-calico-ipvs3-ha/yaml/kubeadm-config.yaml +++ b/cicd/k8s-calico-ipvs3-ha/yaml/kubeadm-config.yaml @@ -14,6 +14,7 @@ nodeRegistration: imagePullPolicy: IfNotPresent name: master taints: null + criSocket: unix:///var/run/cri-dockerd.sock --- apiVersion: kubeadm.k8s.io/v1beta3 certificatesDir: /etc/kubernetes/pki @@ -67,3 +68,7 @@ metricsBindAddress: 127.0.0.1:10249 nodePortAddresses: null oomScoreAdj: -999 portRange: "" +--- +kind: KubeletConfiguration +apiVersion: kubelet.config.k8s.io/v1beta1 +cgroupDriver: systemd diff --git a/cicd/k8s-calico-ipvs3/node_scripts/common.sh b/cicd/k8s-calico-ipvs3/node_scripts/common.sh index c01ad688f..ded6b8b5d 100644 --- a/cicd/k8s-calico-ipvs3/node_scripts/common.sh +++ b/cicd/k8s-calico-ipvs3/node_scripts/common.sh @@ -15,6 +15,7 @@ cat </dev/null; echo "@reboot /sbin/swapoff -a") | crontab - || true sudo apt-get update -y -# Install CRI-O Runtime -VERSION="$(echo ${KUBERNETES_VERSION} | grep -oE '[0-9]+\.[0-9]+')" -CRIO_VERSION=1.27 -# Create the .conf file to load the modules at bootup -cat <> /etc/default/crio << EOF -${ENVIRONMENT} -EOF -sudo systemctl daemon-reload -sudo systemctl enable crio --now - -echo "CRI runtime installed successfully" - -sudo apt-get update sudo apt-get install -y apt-transport-https ca-certificates curl gpg -curl -fsSL https://pkgs.k8s.io/core:/stable:/v$VERSION/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg +curl -fsSL https://pkgs.k8s.io/core:/stable:/v$VERSION/deb/Release.key | sudo gpg --no-tty --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v'$VERSION'/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list sudo apt-get update -y diff --git a/cicd/k8s-calico-ipvs3/node_scripts/master.sh b/cicd/k8s-calico-ipvs3/node_scripts/master.sh index 41793b5fa..2d3eb1efd 100644 --- a/cicd/k8s-calico-ipvs3/node_scripts/master.sh +++ b/cicd/k8s-calico-ipvs3/node_scripts/master.sh @@ -6,10 +6,6 @@ set -euxo pipefail NODENAME=$(hostname -s) -sudo kubeadm config images pull - -echo "Preflight Check Passed: Downloaded All Required Images" - #sudo kubeadm init --apiserver-advertise-address=$CONTROL_IP --apiserver-cert-extra-sans=$CONTROL_IP --pod-network-cidr=$POD_CIDR --service-cidr=$SERVICE_CIDR --node-name "$NODENAME" --ignore-preflight-errors Swap sudo kubeadm init --ignore-preflight-errors Swap --config /vagrant/yaml/kubeadm-config.yaml @@ -33,7 +29,8 @@ cp -i /etc/kubernetes/admin.conf $config_path/config touch $config_path/join.sh chmod +x $config_path/join.sh -kubeadm token create --print-join-command > $config_path/join.sh +join_cmd=`kubeadm token create --print-join-command` +echo $join_cmd "--cri-socket /var/run/cri-dockerd.sock" > $config_path/join.sh # Install Calico Network Plugin diff --git a/cicd/k8s-calico-ipvs3/yaml/kubeadm-config.yaml b/cicd/k8s-calico-ipvs3/yaml/kubeadm-config.yaml index 245a62553..20a7207ac 100644 --- a/cicd/k8s-calico-ipvs3/yaml/kubeadm-config.yaml +++ b/cicd/k8s-calico-ipvs3/yaml/kubeadm-config.yaml @@ -14,6 +14,7 @@ nodeRegistration: imagePullPolicy: IfNotPresent name: master taints: null + criSocket: unix:///var/run/cri-dockerd.sock --- apiVersion: kubeadm.k8s.io/v1beta3 certificatesDir: /etc/kubernetes/pki @@ -67,3 +68,7 @@ metricsBindAddress: 127.0.0.1:10249 nodePortAddresses: null oomScoreAdj: -999 portRange: "" +--- +kind: KubeletConfiguration +apiVersion: kubelet.config.k8s.io/v1beta1 +cgroupDriver: systemd diff --git a/cicd/k8s-calico-ubuntu22/node_scripts/common.sh b/cicd/k8s-calico-ubuntu22/node_scripts/common.sh index c6cf0f19a..91fdd6650 100644 --- a/cicd/k8s-calico-ubuntu22/node_scripts/common.sh +++ b/cicd/k8s-calico-ubuntu22/node_scripts/common.sh @@ -15,6 +15,7 @@ cat </dev/null; echo "@reboot /sbin/swapoff -a") | crontab - || true sudo apt-get update -y -# Install CRI-O Runtime -VERSION="$(echo ${KUBERNETES_VERSION} | grep -oE '[0-9]+\.[0-9]+')" -CRIO_VERSION=1.27 -# Create the .conf file to load the modules at bootup -cat <> /etc/default/crio << EOF -${ENVIRONMENT} -EOF -sudo systemctl daemon-reload -sudo systemctl enable crio --now - -echo "CRI runtime installed successfully" - -sudo apt-get update sudo apt-get install -y apt-transport-https ca-certificates curl gpg -curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg -echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list +curl -fsSL https://pkgs.k8s.io/core:/stable:/v$VERSION/deb/Release.key | sudo gpg --no-tty --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg +echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v'$VERSION'/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list sudo apt-get update -y sudo apt-get install -y kubelet kubectl kubeadm diff --git a/cicd/k8s-calico-ubuntu22/node_scripts/master.sh b/cicd/k8s-calico-ubuntu22/node_scripts/master.sh index 215a84cf4..ad35ae8e1 100644 --- a/cicd/k8s-calico-ubuntu22/node_scripts/master.sh +++ b/cicd/k8s-calico-ubuntu22/node_scripts/master.sh @@ -6,11 +6,7 @@ set -euxo pipefail NODENAME=$(hostname -s) -sudo kubeadm config images pull - -echo "Preflight Check Passed: Downloaded All Required Images" - -sudo kubeadm init --apiserver-advertise-address=$CONTROL_IP --apiserver-cert-extra-sans=$CONTROL_IP --pod-network-cidr=$POD_CIDR --service-cidr=$SERVICE_CIDR --node-name "$NODENAME" --ignore-preflight-errors Swap +sudo kubeadm init --apiserver-advertise-address=$CONTROL_IP --apiserver-cert-extra-sans=$CONTROL_IP --pod-network-cidr=$POD_CIDR --service-cidr=$SERVICE_CIDR --node-name "$NODENAME" --ignore-preflight-errors Swap --cri-socket /var/run/cri-dockerd.sock mkdir -p "$HOME"/.kube sudo cp -i /etc/kubernetes/admin.conf "$HOME"/.kube/config @@ -32,7 +28,8 @@ cp -i /etc/kubernetes/admin.conf $config_path/config touch $config_path/join.sh chmod +x $config_path/join.sh -kubeadm token create --print-join-command > $config_path/join.sh +join_cmd=`kubeadm token create --print-join-command` +echo $join_cmd "--cri-socket /var/run/cri-dockerd.sock" > $config_path/join.sh # Install Calico Network Plugin diff --git a/cicd/k8s-calico/node_scripts/common.sh b/cicd/k8s-calico/node_scripts/common.sh index 5f629eb14..400dd11c9 100644 --- a/cicd/k8s-calico/node_scripts/common.sh +++ b/cicd/k8s-calico/node_scripts/common.sh @@ -15,6 +15,7 @@ cat </dev/null; echo "@reboot /sbin/swapoff -a") | crontab - || true sudo apt-get update -y -# Install CRI-O Runtime -VERSION="$(echo ${KUBERNETES_VERSION} | grep -oE '[0-9]+\.[0-9]+')" -CRIO_VERSION=1.27 -# Create the .conf file to load the modules at bootup -cat <> /etc/default/crio << EOF -${ENVIRONMENT} -EOF -sudo systemctl daemon-reload -sudo systemctl enable crio --now - -echo "CRI runtime installed successfully" - -sudo apt-get update sudo apt-get install -y apt-transport-https ca-certificates curl gpg -curl -fsSL https://pkgs.k8s.io/core:/stable:/v$VERSION/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg +curl -fsSL https://pkgs.k8s.io/core:/stable:/v$VERSION/deb/Release.key | sudo gpg --no-tty --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v'$VERSION'/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list sudo apt-get update -y diff --git a/cicd/k8s-calico/node_scripts/master.sh b/cicd/k8s-calico/node_scripts/master.sh index 215a84cf4..ad35ae8e1 100755 --- a/cicd/k8s-calico/node_scripts/master.sh +++ b/cicd/k8s-calico/node_scripts/master.sh @@ -6,11 +6,7 @@ set -euxo pipefail NODENAME=$(hostname -s) -sudo kubeadm config images pull - -echo "Preflight Check Passed: Downloaded All Required Images" - -sudo kubeadm init --apiserver-advertise-address=$CONTROL_IP --apiserver-cert-extra-sans=$CONTROL_IP --pod-network-cidr=$POD_CIDR --service-cidr=$SERVICE_CIDR --node-name "$NODENAME" --ignore-preflight-errors Swap +sudo kubeadm init --apiserver-advertise-address=$CONTROL_IP --apiserver-cert-extra-sans=$CONTROL_IP --pod-network-cidr=$POD_CIDR --service-cidr=$SERVICE_CIDR --node-name "$NODENAME" --ignore-preflight-errors Swap --cri-socket /var/run/cri-dockerd.sock mkdir -p "$HOME"/.kube sudo cp -i /etc/kubernetes/admin.conf "$HOME"/.kube/config @@ -32,7 +28,8 @@ cp -i /etc/kubernetes/admin.conf $config_path/config touch $config_path/join.sh chmod +x $config_path/join.sh -kubeadm token create --print-join-command > $config_path/join.sh +join_cmd=`kubeadm token create --print-join-command` +echo $join_cmd "--cri-socket /var/run/cri-dockerd.sock" > $config_path/join.sh # Install Calico Network Plugin