Kubernetes Installation SOP on CentOS Stream 10 (Step-by-Step Deployment Guide 2025)

๐Ÿงญ Kubernetes Installation SOP on CentOS Stream 10

Step-by-step Kubernetes v1.31 deployment on CentOS Stream 10 with containerd, kubeadm, and worker node integration. Optimized for production setups.


๐Ÿ“‹ 1. Pre-requisites

  • Minimum 2 CPUs and 2 GB RAM (4 GB recommended for control plane)
  • Root or sudo privileges
  • Stable internet connectivity
  • Unique hostnames and static IPs for all nodes

⚙️ 2. System Preparation (Run on All Nodes)

hostnamectl set-hostname k8s-master    # Example for master node
dnf update -y
swapoff -a
sed -i '/swap/d' /etc/fstab
modprobe overlay
modprobe br_netfilter

Create sysctl configuration:

cat <


๐Ÿ“ฆ 3. Install Container Runtime (containerd)

dnf install -y yum-utils device-mapper-persistent-data lvm2
dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
dnf install -y containerd.io

Configure containerd:

mkdir -p /etc/containerd
containerd config default | tee /etc/containerd/config.toml
sed -i 's/SystemdCgroup = false/SystemdCgroup = true/' /etc/containerd/config.toml

Enable and start containerd:

systemctl enable --now containerd

๐Ÿš€ 4. Install Kubernetes Components

Add Kubernetes repository:

cat <

Install kubeadm, kubelet, and kubectl:

dnf install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
systemctl enable --now kubelet

๐Ÿ—️ 5. Initialize Kubernetes Control Plane (Master Node)

kubeadm init --pod-network-cidr=10.244.0.0/16

Configure kubectl for the current user:

mkdir -p $HOME/.kube
cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
chown $(id -u):$(id -g) $HOME/.kube/config

๐ŸŒ 6. Install Pod Network Add-on

You can use either Flannel or Calico for the network overlay.

Option 1 — Flannel

kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml

Option 2 — Calico

kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml

๐Ÿงฉ 7. Join Worker Nodes

Run the below command on each worker node (replace placeholders):

kubeadm join :6443 --token  \
    --discovery-token-ca-cert-hash sha256:

๐Ÿงพ 8. Verify Cluster Status

On the master node:

kubectl get nodes
kubectl get pods -A

✅ All nodes should show as “Ready” and system pods running successfully.


© 2025 • Kubernetes Deployment SOP — CentOS Stream 10 Edition Sidhesh D. ๐Ÿง 

Comments

Popular posts from this blog

Install & Configure GLPI on Ubuntu (Nginx + MariaDB + PHP 8.3) — Full SOP 2025

Basic Linux Commands

Secure Ollama API Deployment with Nginx Reverse Proxy