Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading Cluster from 1.23.9 to 1.24.10 not possible #2819

Closed
michaelschefczyk opened this issue Feb 3, 2023 · 8 comments
Closed

Upgrading Cluster from 1.23.9 to 1.24.10 not possible #2819

michaelschefczyk opened this issue Feb 3, 2023 · 8 comments
Labels
kind/support Categorizes issue or PR as a support question. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@michaelschefczyk
Copy link

michaelschefczyk commented Feb 3, 2023

Versions

kubeadm version: 1.23.9

Environment:
Kubernetes version: 1.23.9
Cloud provider or hardware configuration: Self-hosted virtual machine
OS: Debian GNU/Linux 11 (bullseye)
Kernel: 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux
Container runtime: containerd github.com/containerd/containerd 1.4.13ds1 1.4.13ds1-1~deb11u3
Container networking plugin (CNI): rancher/mirrored-flannelcni-flannel v0.19.1

What happened?

After six months, I did intend to upgrade the cluster from 1.23.9 to 1.24.10
based on: https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/

Upon kubeadm upgrade apply v1.24.10, Errors:

[preflight] Some fatal errors occurred:
[ERROR ImagePull]: failed to pull image registry.k8s.io/kube-apiserver:v1.24.10: output: time="2023-02-03T18:17:55+01:00" level=fatal msg="validate service connection: CRI v1 image API is not implemented for endpoint "unix:///var/run/cri-dockerd.sock": rpc error: code = Unimplemented desc = unknown service runtime.v1.ImageService"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/kube-controller-manager:v1.24.10: output: time="2023-02-03T18:17:55+01:00" level=fatal msg="validate service connection: CRI v1 image API is not implemented for endpoint "unix:///var/run/cri-dockerd.sock": rpc error: code = Unimplemented desc = unknown service runtime.v1.ImageService"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/kube-scheduler:v1.24.10: output: time="2023-02-03T18:17:55+01:00" level=fatal msg="validate service connection: CRI v1 image API is not implemented for endpoint "unix:///var/run/cri-dockerd.sock": rpc error: code = Unimplemented desc = unknown service runtime.v1.ImageService"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/kube-proxy:v1.24.10: output: time="2023-02-03T18:17:55+01:00" level=fatal msg="validate service connection: CRI v1 image API is not implemented for endpoint "unix:///var/run/cri-dockerd.sock": rpc error: code = Unimplemented desc = unknown service runtime.v1.ImageService"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/pause:3.7: output: time="2023-02-03T18:17:56+01:00" level=fatal msg="validate service connection: CRI v1 image API is not implemented for endpoint "unix:///var/run/cri-dockerd.sock": rpc error: code = Unimplemented desc = unknown service runtime.v1.ImageService"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/etcd:3.5.6-0: output: time="2023-02-03T18:17:56+01:00" level=fatal msg="validate service connection: CRI v1 image API is not implemented for endpoint "unix:///var/run/cri-dockerd.sock": rpc error: code = Unimplemented desc = unknown service runtime.v1.ImageService"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/coredns/coredns:v1.8.6: output: time="2023-02-03T18:17:56+01:00" level=fatal msg="validate service connection: CRI v1 image API is not implemented for endpoint "unix:///var/run/cri-dockerd.sock": rpc error: code = Unimplemented desc = unknown service runtime.v1.ImageService"
, error: exit status 1

editing kubectl -n kube-system edit cm kubeadm-config
imageRepository back to k8s.gcr.io does not work -> overwritten by registry.k8s.io each time

updating containerd to newer version from docker repo does not work, because then the API server is no longer available.

P.S. Support question: Is there a way out of this or do I kill my cluster and start over from scratch?

What you expected to happen?

Clean upgrade, as before.

How to reproduce it (as minimally and precisely as possible)?

Uncertain. It does happen every time I try it from a reverted version.

Anything else we need to know?

@kundan2707
Copy link
Contributor

/retitle Upgrading Cluster from 1.23.9 to 1.24.10 not possible

@k8s-ci-robot k8s-ci-robot changed the title Upgrading Cluster vom 1.23.9 to 1.24.10 not possible Upgrading Cluster from 1.23.9 to 1.24.10 not possible Feb 6, 2023
@SataQiu
Copy link
Member

SataQiu commented Feb 6, 2023

Hi @michaelschefczyk
Thanks for your feedback.

validate service connection: CRI v1 image API is not implemented for endpoint "unix:///var/run/cri-dockerd.sock"

It appears that you are still using docker as the container runtime, and it does not support the runtime.v1 api. What's the cri-dockerd version?
And maybe you can try migrating docker to containerd with https://kubernetes.io/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd/

@SataQiu SataQiu added the priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. label Feb 6, 2023
@neolit123
Copy link
Member

/support

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Hello, @michaelschefczyk 🤖 👋

You seem to have troubles using Kubernetes and kubeadm.
Note that our issue trackers should not be used for providing support to users.
There are special channels for that purpose.

Please see:

@github-actions github-actions bot added the kind/support Categorizes issue or PR as a support question. label Feb 7, 2023
@github-actions github-actions bot closed this as completed Feb 7, 2023
@neolit123
Copy link
Member

yes, if using docker try moving to containerd
it's manual

@michaelschefczyk
Copy link
Author

No need to worry about me, but please consider working on more telling error messages!

I did resolve my case by seeting up a new cluster. Of course, this is a matrix of n-dimensional complexity: Debian bullseye does not provide a containerd-package compatible with Kubernetes > 1.25, so one needs to move to another source (in my case docker repository). Then, if one wants to use a private repository (outside docker, so that is is available even when the cluster is off), one does need tls where the certificates are trusted and providing the name via SAN (unclear if this is imposed by the particular containerd-version or by kubelet - there is documentation to skip certificate verification but it does not seem to match the latest version of containerd and/or kubelet). Hence, I made my respository available via a reverse proxy (haproxy).

@karlvr
Copy link

karlvr commented Jun 3, 2023

I have just experienced this problem and I believe the image pull errors that you experienced @michaelschefczyk are because your installed version of cri-tools was newer than your Kubernetes binaries. I didn't control the version of cri-tools and because kubeadm depends on >= I had the latest installed, which was 1.26, and which is incompatible with the older version of cri-dockerd because of https://kubernetes.io/blog/2022/12/09/kubernetes-v1-26-release/#cri-v1alpha2-removed

You can remedy the issue by downgrading cri-tools:

apt install cri-tools=1.23.17-00

Now that I've upgraded to cri-dockerd 0.3.2 my cri-tools works and I can upgrade.

@neolit123
Copy link
Member

i am surprised cri-dockerd is as maintained. note that the original estimate was that the project will not be able to keep up.

in any case, k8s recommends containerd or crio.
containerd in particular is recommended to be installed from its github readme / packages and not from a distro:
https://kubernetes.io/docs/setup/production-environment/container-runtimes/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
None yet
Development

No branches or pull requests

5 participants