sandervanvugt / cka

410 stars 520 forks source link

CRI not running after running ./cka/setup-container.sh #12

Closed nsalfos closed 1 year ago

nsalfos commented 1 year ago
[root@controller cka]# ./setup-container.sh 
setting up CentOS 7 with Docker
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: download.cf.centos.org
 * extras: download.cf.centos.org
 * updates: download.cf.centos.org
Package 2:vim-enhanced-7.4.629-8.el7_9.x86_64 already installed and latest version
Package yum-utils-1.1.31-54.el7_8.noarch already installed and latest version
Package device-mapper-persistent-data-0.8.5-3.el7_9.2.x86_64 already installed and latest version
Package 7:lvm2-2.02.187-6.el7_9.5.x86_64 already installed and latest version
Nothing to do
Loaded plugins: fastestmirror
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: download.cf.centos.org
 * extras: download.cf.centos.org
 * updates: download.cf.centos.org
Package 3:docker-ce-20.10.23-3.el7.x86_64 already installed and latest version
Nothing to do
Failed to execute operation: No such file or directory
printing MYOS CentOS

[root@controller cka]# kubeadm init
[init] Using Kubernetes version: v1.26.1
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
        [ERROR CRI]: container runtime is not running: output: time="2023-01-24T17:21:08Z" level=fatal msg="validate service connection: CRI v1 runtime API is not implemented for endpoint \"unix:///var/run/containerd/containerd.sock\": rpc error: code = Unimplemented desc = unknown service runtime.v1.RuntimeService"
, error: exit status 1
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher
[root@controller cka]# 
danielecazzari commented 1 year ago

I had a similar issue on ubuntu 22.04. It seems that containerd version provided by ubuntu repo is too old for the lasted kubernetes version releases 1 week ago see also: https://kubernetes.io/blog/2022/11/18/upcoming-changes-in-kubernetes-1-26/#cri-api-removal I solved by manually upgrading the version but maybe sender would suggest a better approach. Those are the command I used:

sudo su
wget https://github.com/containerd/containerd/releases/download/v1.6.15/containerd-1.6.15-linux-amd64.tar.gz
tar xvf containerd-1.6.15-linux-amd64.tar.gz
systemctl stop containerd
cd bin
cp * /usr/bin/
systemctl start containerd
sandervanvugt commented 1 year ago

Thanks for your much appreciated feedback. I have integrated your solution in the setup-container.sh script, while waiting for a container update to be released in the Ubuntu repositories. Please let me know if you have any additional feedback.

On 25 Jan 2023, at 15:09, @. @.> wrote:

I had a similar issue on ubuntu 22.04. It seems that containerd version provided by ubuntu repo is too old for the lasted kubernetes version releases 1 week ago see also: https://kubernetes.io/blog/2022/11/18/upcoming-changes-in-kubernetes-1-26/#cri-api-removal https://kubernetes.io/blog/2022/11/18/upcoming-changes-in-kubernetes-1-26/#cri-api-removal I solved by manually upgrading the version but maybe sender would suggest a better approach. Those are the command I used: sudo su wget https://github.com/containerd/containerd/releases/download/v1.6.15/containerd-1.6.15-linux-amd64.tar.gz https://github.com/containerd/containerd/releases/download/v1.6.15/containerd-1.6.15-linux-amd64.tar.gz tar xvf containerd-1.6.15-linux-amd64.tar.gz systemctl stop containerd cd bin cp * /usr/bin/ systemctl start containerd

— Reply to this email directly, view it on GitHub https://github.com/sandervanvugt/cka/issues/12#issuecomment-1403681158, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3TNVUL5QTZG53E2CJEUPTWUEXZ3ANCNFSM6AAAAAAUFLLDG4. You are receiving this because you are subscribed to this thread.

nsalfos commented 1 year ago

Hey @sandervanvugt thanks for coming back, it seems you updated the script but left out CentOS completely there.

sandervanvugt commented 1 year ago

Sorry, I’ll work on CentOS later and provide a full update. The old code was CentOS 7 only anyway, and I’m too busy now to give that an update as well now.

On 26 Jan 2023, at 12:27, nsalfos @.***> wrote:

Hey @sandervanvugt https://github.com/sandervanvugt thanks for coming back, it seems you updated the script but left out CentOS completely there.

— Reply to this email directly, view it on GitHub https://github.com/sandervanvugt/cka/issues/12#issuecomment-1404874336, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3TNVRO2MDCGQD5GXXURALWUJNTHANCNFSM6AAAAAAUFLLDG4. You are receiving this because you were mentioned.

nsalfos commented 1 year ago

@sandervanvugt no worries, thanks for the quick reply, i'll try to go over the kubernets doc, document the steps i do and send you PR later.

nsalfos commented 1 year ago

@sandervanvugt sent that PR, feel free to check and modify as you please, hope it helps!