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.ioConfigure containerd:
mkdir -p /etc/containerd containerd config default | tee /etc/containerd/config.toml sed -i 's/SystemdCgroup = false/SystemdCgroup = true/' /etc/containerd/config.tomlEnable 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/16Configure 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.ymlOption 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
Post a Comment