Welcome to the Linux Foundation Forum!

failed to install kubadm k8s with cri-o version 1.20 on ubuntu

I have tried all my options but still failing; please advise.....

root@wf-st-cctr1:~# install cri-o cri-o-runc cri-tools
install: target 'cri-tools' is not a directory
root@wf-st-cctr1:~# apt install cri-o cri-o-runc cri-tools
Reading package lists... Done

root@wf-st-cctr1:~# vi /etc/crio/crio.conf
root@wf-st-cctr1:~# systemctl enable cri-o.service
Created symlink /etc/systemd/system/multi-user.target.wants/crio.service → /usr/lib/systemd/system/crio.service.
root@wf-st-cctr1:~# shutdown -r now

ubuntu@wf-st-cctr1's password:
Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-140-generic x86_64)

ubuntu@wf-st-cctr1:~$ sudo systemctl status cri-o
● crio.service - Container Runtime Interface for OCI (CRI-O)
Loaded: loaded (/usr/lib/systemd/system/crio.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2021-04-11 09:39:30 CEST; 21s ago
Docs: https://github.com/cri-o/cri-o
Main PID: 1130 (crio)
Tasks: 13
CGroup: /system.slice/crio.service
└─1130 /usr/bin/crio

ubuntu@wf-st-cctr1:~$ sudo apt install -y kubelet=1.20.5-00 kubeadm=1.20.5-00 kubectl=1.20.5-00
Reading package lists... Done

ubuntu@wf-st-cctr1:~$ sudo apt-mark hold kubelet kubeadm kubectl
kubelet set on hold.
kubeadm set on hold.
kubectl set on hold.
ubuntu@wf-st-cctr1:~$ ll /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
-rw-r----- 1 root root 898 Mar 18 22:25 /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
ubuntu@wf-st-cctr1:~$ sudo vi !$
sudo vi /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
ubuntu@wf-st-cctr1:~$ sudo vi /etc/default/kubelet

#

ubuntu@wf-st-cctr1:~$ sudo kubeadm init --pod-network-cidr="10.244.0.0/16" --kubernetes-version=1.20.5
[init] Using Kubernetes version: v1.20.5
[preflight] Running pre-flight checks
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
[certs] Using certificateDir folder "/etc/kubernetes/pki"
[certs] Generating "ca" certificate and key
[certs] Generating "apiserver" certificate and key
[certs] apiserver serving cert is signed for DNS names [kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local wf-st-cctr1] and IPs [10.96.0.1 10.9.4.145]
[certs] Generating "apiserver-kubelet-client" certificate and key
[certs] Generating "front-proxy-ca" certificate and key
[certs] Generating "front-proxy-client" certificate and key
[certs] Generating "etcd/ca" certificate and key
[certs] Generating "etcd/server" certificate and key
[certs] etcd/server serving cert is signed for DNS names [localhost wf-st-cctr1] and IPs [10.9.4.145 127.0.0.1 ::1]
[certs] Generating "etcd/peer" certificate and key
[certs] etcd/peer serving cert is signed for DNS names [localhost wf-st-cctr1] and IPs [10.9.4.145 127.0.0.1 ::1]
[certs] Generating "etcd/healthcheck-client" certificate and key
[certs] Generating "apiserver-etcd-client" certificate and key
[certs] Generating "sa" key and public key
[kubeconfig] Using kubeconfig folder "/etc/kubernetes"
[kubeconfig] Writing "admin.conf" kubeconfig file
[kubeconfig] Writing "kubelet.conf" kubeconfig file
[kubeconfig] Writing "controller-manager.conf" kubeconfig file
[kubeconfig] Writing "scheduler.conf" kubeconfig file
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
[kubelet-start] Starting the kubelet
[control-plane] Using manifest folder "/etc/kubernetes/manifests"
[control-plane] Creating static Pod manifest for "kube-apiserver"
[control-plane] Creating static Pod manifest for "kube-controller-manager"
[control-plane] Creating static Pod manifest for "kube-scheduler"
[etcd] Creating static Pod manifest for local etcd in "/etc/kubernetes/manifests"
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
[kubelet-check] Initial timeout of 40s passed.

Unfortunately, an error has occurred:
    timed out waiting for the condition

This error is likely caused by:
    - The kubelet is not running
    - The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)

If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:
    - 'systemctl status kubelet'
    - 'journalctl -xeu kubelet'

Comments

  • chrispokorni
    chrispokorni Posts: 2,372

    Hi @ltosolini,

    Did you happen to follow the steps as presented in the lab guide? Some steps seem to have been missed, while others altered from the ones in the lab. I would recommend following them as presented to ensure the proper configuration of your environment.

    Regards,
    -Chris

Categories

Upcoming Training