From 7d06a5ce91ee9aa3d8acd732aef9423010fb3a7b Mon Sep 17 00:00:00 2001 From: Jan Pazdziora Date: Wed, 18 Dec 2024 17:07:54 +0100 Subject: [PATCH] Upgrade to Kind 0.26.0. --- .github/workflows/kind-version-check.yaml | 2 +- Dockerfile | 2 +- README.md | 20 ++++++++++---------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/kind-version-check.yaml b/.github/workflows/kind-version-check.yaml index be2086d..e96a0a8 100644 --- a/.github/workflows/kind-version-check.yaml +++ b/.github/workflows/kind-version-check.yaml @@ -11,6 +11,6 @@ jobs: runs-on: ubuntu-latest steps: - run: curl -s https://api.github.com/repos/kubernetes-sigs/kind/releases > kind-releases.json - - run: jq -r '.[0].name' kind-releases.json | grep -Fx 'v0.25.0' + - run: jq -r '.[0].name' kind-releases.json | grep -Fx 'v0.26.0' - run: jq -r '.[0].name, .[0]' kind-releases.json if: ${{ failure() }} diff --git a/Dockerfile b/Dockerfile index 60ebe8d..5746c0e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM quay.io/podman/stable RUN dnf install -y kubernetes-client && dnf clean all -RUN curl -Lso /usr/local/bin/kind https://kind.sigs.k8s.io/dl/v0.25.0/kind-linux-amd64 +RUN curl -Lso /usr/local/bin/kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-linux-amd64 RUN chmod +x /usr/local/bin/kind RUN sed -i 's/utsns=.*/utsns="private"/; s/cgroups=.*/cgroups="enabled"/' /etc/containers/containers.conf COPY kind-cluster.yaml kind-cluster-rootless.yaml /etc/ diff --git a/README.md b/README.md index dce12ea..84b99c0 100644 --- a/README.md +++ b/README.md @@ -20,14 +20,14 @@ with podman installed in it, to which we install **kind**: ``` $ podman run --rm -ti --privileged -h container quay.io/podman/stable -[root@container /]# curl -Lso /usr/local/bin/kind https://kind.sigs.k8s.io/dl/v0.25.0/kind-linux-amd64 +[root@container /]# curl -Lso /usr/local/bin/kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-linux-amd64 [root@container /]# chmod +x /usr/local/bin/kind [root@container /]# kind create cluster --retain enabling experimental podman provider Creating cluster "kind" ... - ✓ Ensuring node image (kindest/node:v1.31.2) đŸ–ŧ + ✓ Ensuring node image (kindest/node:v1.32.0) đŸ–ŧ ✗ Preparing nodes đŸ“Ļ -ERROR: failed to create cluster: command "podman run --name kind-control-plane --hostname kind-control-plane --label io.x-k8s.kind.role=control-plane --privileged --tmpfs /tmp --tmpfs /run --volume f7f4da52565ae59bd30421c0153bb9fe06eba5f3af79239f1133c21b244dc8ba:/var:suid,exec,dev --volume /lib/modules:/lib/modules:ro -e KIND_EXPERIMENTAL_CONTAINERD_SNAPSHOTTER --detach --tty --net kind --label io.x-k8s.kind.cluster=kind -e container=podman --cgroupns=private --publish=127.0.0.1:43177:6443/tcp -e KUBECONFIG=/etc/kubernetes/admin.conf docker.io/kindest/node@sha256:18fbefc20a7113353c7b75b5c869d7145a6abd6269154825872dc59c1329912e" failed with error: exit status 125 +ERROR: failed to create cluster: command "podman run --name kind-control-plane --hostname kind-control-plane --label io.x-k8s.kind.role=control-plane --privileged --tmpfs /tmp --tmpfs /run --volume e1c9b4ef6306bc66311dc6e74331dd2adecfb08c7553b1848929ee2fcd72cfa3:/var:suid,exec,dev --volume /lib/modules:/lib/modules:ro -e KIND_EXPERIMENTAL_CONTAINERD_SNAPSHOTTER --detach --tty --net kind --label io.x-k8s.kind.cluster=kind -e container=podman --cgroupns=private --publish=127.0.0.1:46703:6443/tcp -e KUBECONFIG=/etc/kubernetes/admin.conf docker.io/kindest/node@sha256:c48c62eac5da28cdadcf560d1d8616cfa6783b58f0d94cf63ad1bf49600cb027" failed with error: exit status 125 Command Output: Error: invalid config provided: cannot set hostname when running in the host UTS namespace: invalid configuration ``` @@ -62,17 +62,17 @@ Deleted nodes: ["kind-control-plane"] [root@container /]# kind create cluster --retain enabling experimental podman provider Creating cluster "kind" ... - ✓ Ensuring node image (kindest/node:v1.31.2) đŸ–ŧ + ✓ Ensuring node image (kindest/node:v1.32.0) đŸ–ŧ ✓ Preparing nodes đŸ“Ļ ✓ Writing configuration 📜 ✗ Starting control-plane 🕹ī¸ ERROR: failed to create cluster: failed to init node with kubeadm: command "podman exec --privileged kind-control-plane kubeadm init --config=/kind/kubeadm.conf --skip-token-print --v=6" failed with error: exit status 1 -Command Output: I1121 12:24:48.966656 141 initconfiguration.go:261] loading configuration from "/kind/kubeadm.conf" -W1121 12:24:48.966998 141 common.go:101] your configuration file uses a deprecated API spec: "kubeadm.k8s.io/v1beta3" (kind: "ClusterConfiguration"). Please use 'kubeadm config migrate --old-config old.yaml --new-config new.yaml', which will write the new, similar spec using a newer API version. +Command Output: I1218 16:12:11.778875 144 initconfiguration.go:261] loading configuration from "/kind/kubeadm.conf" +W1218 16:12:11.779213 144 common.go:101] your configuration file uses a deprecated API spec: "kubeadm.k8s.io/v1beta3" (kind: "ClusterConfiguration"). Please use 'kubeadm config migrate --old-config old.yaml --new-config new.yaml', which will write the new, similar spec using a newer API version. [...] [wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests" [kubelet-check] Waiting for a healthy kubelet at http://127.0.0.1:10248/healthz. This can take up to 4m0s -[kubelet-check] The kubelet is not healthy after 4m0.000208828s +[kubelet-check] The kubelet is not healthy after 4m0.001314329s Unfortunately, an error has occurred: The HTTP call equal to 'curl -sSL http://127.0.0.1:10248/healthz' returned error: Get "http://127.0.0.1:10248/healthz": context deadline exceeded [...] @@ -85,7 +85,7 @@ messages but we can continue the debugging with ``` where ``` -Nov 21 12:24:51 kind-control-plane kubelet[180]: E1121 12:24:51.323604 180 kubelet.go:498] "Failed to create an oomWatcher (running in UserNS, Hint: enable KubeletInUserNamespace feature flag to ignore the error)" err="open /dev/kmsg: operation not permitted" +Dec 18 16:12:14 kind-control-plane kubelet[184]: E1218 16:12:14.321978 184 kubelet.go:536] "Failed to create an oomWatcher (running in UserNS, Hint: enable KubeletInUserNamespace feature flag to ignore the error)" err="open /dev/kmsg: operation not permitted" ``` seems the most relevant. @@ -107,7 +107,7 @@ we can actually get the initial step pass: [root@container /]# kind create cluster --retain --config kind-cluster.yaml enabling experimental podman provider Creating cluster "kind" ... - ✓ Ensuring node image (kindest/node:v1.31.2) đŸ–ŧ + ✓ Ensuring node image (kindest/node:v1.32.0) đŸ–ŧ ✓ Preparing nodes đŸ“Ļ ✓ Writing configuration 📜 ✓ Starting control-plane 🕹ī¸ @@ -118,7 +118,7 @@ You can now use your cluster with: kubectl cluster-info --context kind-kind -Not sure what to do next? 😅 Check out https://kind.sigs.k8s.io/docs/user/quick-start/ +Have a nice day! 👋 ``` We can then use