The SRE series: Install Kubernetes 1.21.1 on Centos 8 Stream (include fix CAP_PERFMON)

Francesco Sbaraglia
NEW IT Engineering
Published in
10 min readJun 5, 2021

--

Use only CRI-o, this tutorial includes how to fix the “CAP_PERFMON” bug without installing docker or containerd.

Photo by Teng Yuhong on Unsplash

I have installed CentOS-8 Stream using CentOS-8.3.2011-x86_64-dvd1.iso. Important prerequisites before starting the installation of cri-o and Kubernetes, if you want to connect your 1st node with other worker and master nodes.

a. verify that product_uuid is unique for every node of the cluster

sudo cat /sys/class/dmi/id/product_uuid

b. verify the MAC address of each network devices, it needs to be unique

ip link
ifconfig -a

c. (Optional) but really suggested, hardening of Linux Server, list of the pre-installed /etc/ssh/ssh_host* priv and pub keys, we are going to regenerate all of them (formats: ecdsa, ed25519, rsa)

ls -la /etc/ssh/ssh_host*
-rw-r-----. 1 root ssh_keys 480 May 25 13:25 /etc/ssh/ssh_host_ecdsa_key
-rw-r--r--. 1 root root 162 May 25 13:25 /etc/ssh/ssh_host_ecdsa_key.pub
-rw-r-----. 1 root ssh_keys 387 May 25 13:25 /etc/ssh/ssh_host_ed25519_key
-rw-r--r--. 1 root root 82 May 25 13:25 /etc/ssh/ssh_host_ed25519_key.pub
-rw-r-----. 1 root ssh_keys 2578 May 25 13:25 /etc/ssh/ssh_host_rsa_key
-rw-r--r--. 1 root…

--

--

Francesco Sbaraglia
NEW IT Engineering

Francesco is Site Reliability Engineering Architect and DevSecOps SME. He is expert in hybrid multi-cloud architecture, K8S, AIOps and Chaos Engineering