kubermatic / kubeone

Kubermatic KubeOne automate cluster operations on all your cloud, on-prem, edge, and IoT environments.
https://kubeone.io
Apache License 2.0
1.31k stars 231 forks source link

Can't create Kubernetes v1.23.6 cluster on Hetzner with CentOS Stream 9 nodes #2027

Open andreipetru opened 2 years ago

andreipetru commented 2 years ago

What happened?

Kubeone does not bootstrap cluster on Hetzner on CentOS Stream 9 nodes OS due to missing containerd version.

kubeone apply -m kubeone.yaml -t tf.json

INFO[22:07:56 EEST] Determine hostname...                        
INFO[22:07:56 EEST] Determine operating system...                
INFO[22:07:56 EEST] Running host probes...                       
The following actions will be taken: 
Run with --verbose flag for more information.
        + initialize control plane node "staging-cluster-control-plane-1" (172.30.0.3) using 1.22.9
        + ensure machinedeployment "staging-cluster-pool1" with 2 replica(s) exists
        + apply embedded and custom addons defined in "./addons"

Do you want to proceed (yes/no): yes

INFO[22:08:04 EEST] Determine hostname...                        
INFO[22:08:04 EEST] Determine operating system...                
INFO[22:08:04 EEST] Running host probes...                       
INFO[22:08:04 EEST] Installing prerequisites...                  
INFO[22:08:04 EEST] Creating environment file...                  node=XXX.XXX.XXX.XXX os=centos
INFO[22:08:05 EEST] Configuring proxy...                          node=XXX.XXX.XXX.XXX os=centos
INFO[22:08:05 EEST] Installing kubeadm...                         node=XXX.XXX.XXX.XXX os=centos
ERRO[22:08:20 EEST] failed to install kubeadm: + export PATH=/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/usr/local/bin:/opt/bin
+ PATH=/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/usr/local/bin:/opt/bin
+ sudo swapoff -a
+ sudo sed -i '/.*swap.*/d' /etc/fstab
+ sudo setenforce 0
+ '[' -f /etc/selinux/config ']'
+ sudo sed -i s/SELINUX=enforcing/SELINUX=permissive/g /etc/selinux/config
+ sudo systemctl disable --now firewalld
Failed to disable unit: Unit file firewalld.service does not exist.
+ true
+ source /etc/kubeone/proxy-env
+ cat
+ sudo tee /etc/modules-load.d/containerd.conf
+ sudo modprobe overlay
+ sudo modprobe br_netfilter
+ sudo modprobe ip_tables
+ sudo mkdir -p /etc/sysctl.d
+ cat
+ sudo tee /etc/sysctl.d/k8s.conf
+ sudo sysctl --system
sysctl: setting key "net.ipv4.conf.all.rp_filter": Invalid argument
sysctl: setting key "net.ipv4.conf.all.accept_source_route": Invalid argument
sysctl: setting key "net.ipv4.conf.all.promote_secondaries": Invalid argument
sysctl: setting key "net.ipv4.conf.all.rp_filter": Invalid argument
+ sudo mkdir -p /etc/systemd/journald.conf.d
+ cat
+ sudo tee /etc/systemd/journald.conf.d/max_disk_use.conf
+ sudo systemctl force-reload systemd-journald
+ yum_proxy=
+ grep -v '#kubeone' /etc/yum.conf
+ echo -n ''
+ sudo mv /tmp/yum.conf /etc/yum.conf
+ cat
+ sudo tee /etc/yum.repos.d/kubernetes.repo
+ source /etc/os-release
++ NAME='CentOS Stream'
++ VERSION=9
++ ID=centos
++ ID_LIKE='rhel fedora'
++ VERSION_ID=9
++ PLATFORM_ID=platform:el9
++ PRETTY_NAME='CentOS Stream 9'
++ ANSI_COLOR='0;31'
++ LOGO=fedora-logo-icon
++ CPE_NAME=cpe:/o:centos:centos:9
++ HOME_URL=https://centos.org/
++ BUG_REPORT_URL=https://bugzilla.redhat.com/
++ REDHAT_SUPPORT_PRODUCT='Red Hat Enterprise Linux 9'
++ REDHAT_SUPPORT_PRODUCT_VERSION='CentOS Stream'
+ '[' centos == centos ']'
+ '[' 9 == 8 ']'
+ sudo yum install -y yum-plugin-versionlock device-mapper-persistent-data lvm2 conntrack-tools ebtables socat iproute-tc rsync
+ sudo yum install -y yum-utils
+ sudo yum-config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
+ sudo yum-config-manager --save --setopt=docker-ce-stable.module_hotfixes=true
+ sudo yum versionlock delete containerd.io
+ sudo yum install -y 'containerd.io-1.4.*'
Error: Unable to find a match: containerd.io-1.4.*
: Process exited with status 1  node=XXX.XXX.XXX.XXX

Expected behavior

Kubernetes cluster version 1.23.6 is deployed on supported CentOS Stream 9 nodes successfully.

How to reproduce the issue?

What KubeOne version are you using?

```console $ kubeone version { "kubeone": { "major": "1", "minor": "4", "gitVersion": "1.4.2", "gitCommit": "e1ef6466e56fb543b011239faa42e32cd712101c", "gitTreeState": "", "buildDate": "2022-04-26T11:05:53Z", "goVersion": "go1.17.5", "compiler": "gc", "platform": "darwin/amd64" }, "machine_controller": { "major": "1", "minor": "43", "gitVersion": "v1.43.2", "gitCommit": "", "gitTreeState": "", "buildDate": "", "goVersion": "", "compiler": "", "platform": "linux/amd64" } } ```

Provide your KubeOneCluster manifest here (if applicable)

```yaml apiVersion: kubeone.k8c.io/v1beta2 kind: KubeOneCluster versions: kubernetes: 1.23.6 clusterNetwork: cni: canal: mtu: 1400 cloudProvider: hetzner: {} external: true addons: enable: true path: ./addons addons: - name: default-storage-class - name: unattended-upgrades ```

What cloud provider are you running on?

Hetzner Cloud

What operating system are you running in your cluster?

CentOS Stream 9

Additional information

terraform.tfvars

cluster_name = "test-cluster"
ssh_public_key_file = "~/key.pub"
ssh_private_key_file = "~/key"
ip_range = "172.30.0.0/16"
control_plane_type = "cpx31"
image = "centos-stream-9"
control_plane_replicas = 1
worker_type = "cpx41"
worker_os = "centos"
workers_replicas = 2
kron4eg commented 2 years ago

Sorry, we never tested and never claimed that we support centos-stream, especially 9. But we accept contributions ;)