From 1d8305a110b59cece015182c8161a0207ae097bf Mon Sep 17 00:00:00 2001 From: hsinhoyeh Date: Thu, 13 Jun 2024 17:06:26 +0800 Subject: [PATCH] bump: golang v1.21.5 - also update hacking scripts and troubleshooting fixes: #76 --- Dockerfile | 2 +- Makefile | 2 +- hack/kubeadm/0.install_kubeadm.sh | 31 +++++++++---------------------- hack/troubleshooting.md | 11 +++++++++++ 4 files changed, 22 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7ae628f..6ea11e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21.5-alpine3.19 AS build +FROM golang:1.21.6-bookworm AS build WORKDIR /src COPY . . diff --git a/Makefile b/Makefile index 1c8adde..b0eba27 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ GITCOMMITID=$(shell git rev-parse HEAD) tidy: ./gomodtidy.sh -docker: +builddocker: docker build -t footprintai/multikf:v1 \ --no-cache -f Dockerfile . docker push footprintai/multikf:v1 diff --git a/hack/kubeadm/0.install_kubeadm.sh b/hack/kubeadm/0.install_kubeadm.sh index 71d1131..679ca3c 100644 --- a/hack/kubeadm/0.install_kubeadm.sh +++ b/hack/kubeadm/0.install_kubeadm.sh @@ -14,34 +14,21 @@ mkdir -p /etc/apt/keyrings +## install v1.25 + echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.25/deb/ /" | tee /etc/apt/sources.list.d/kubernetes.list curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.25/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg - -## verify pager /etc/apt/sources.list.d/kubernetes.list -## deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.25/deb/ / - apt-get update apt-get install -y kubelet=1.25.14-1.1 kubeadm=1.25.14-1.1 kubectl=1.25.14-1.1 -apt-mark hold kubeadm kubelet kubectl -## version v1.24.17 (this requires additional configuration as apt-get would do that) -#curl -LO https://dl.k8s.io/release/v1.24.17/bin/linux/amd64/kubectl \ -# && chmod +x kubectl \ -# && mv kubectl /usr/bin/ -#curl -LO https://dl.k8s.io/release/v1.24.17/bin/linux/amd64/kubeadm \ -# && chmod +x kubeadm \ -# && mv kubeadm /usr/bin/ -#curl -LO https://dl.k8s.io/release/v1.24.17/bin/linux/amd64/kubelet \ -# && chmod +x kubelet \ -# && mv kubelet /usr/bin/ -## install crictl -#curl -LO https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.26.0/crictl-v1.26.0-linux-amd64.tar.gz \ -# && tar xzvf crictl-v1.26.0-linux-amd64.tar.gz \ -# && chmod +x crictl \ -# && mv crictl /usr/bin/ -# add missing package -# apt-get install ethtool socat conntrack -y +### install v1.27.15 +#echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.27/deb/ /" | tee /etc/apt/sources.list.d/kubernetes.list +#curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.27/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg +#apt-get update +#apt-get install -y kubelet=1.27.15-1.1 kubeadm=1.27.15-1.1 kubectl=1.27.15-1.1 +# +apt-mark hold kubeadm kubelet kubectl # if encountered the following error during install kubelet # W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.cloud.google.com/apt kubernetes-xenial InRelease: NO_PUBKEY B53DC80D13EDEF05 diff --git a/hack/troubleshooting.md b/hack/troubleshooting.md index b398cfe..edcf33f 100644 --- a/hack/troubleshooting.md +++ b/hack/troubleshooting.md @@ -39,3 +39,14 @@ then run `sudo sysctl -p` to update such changes into system during installation gpu-operator on kind (kubernetes in docker), `nvidia-operator-validator-67zsz` would failed to run due to `/sbin/ldconfig.real` is not found. the simple workaround would be fixed with the symbolic link: `ln -s /sbin/ldconfig /sbin/ldconfig.real` +#### etcd keep rebooting #### + +when your etcd is keep rebooting, especially you are using kubeadm with v1.27+, +you might want to turn the flag on by editing the file `/etc/containerd/config.toml` : + +``` +[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options] + SystemdCgroup = true +``` + +ref issue: https://github.com/etcd-io/etcd/issues/13670 \ No newline at end of file