This folder contains simple scripts to build a small Kubernetes lab cluster for CKS study and hands-on practice.
- 3 VMs
- 2 vCPU, 4 GB RAM, 50 GB disk each
- Ubuntu Server 24.04 (kernel 6.8)
- Falco 0.38+
Use these names to match the scripts and examples:
- VM 1:
cks-main - VM 2:
cks-worker1 - VM 3:
cks-worker2
install-main.shsets up the control plane node and installs Cilium & Falcoinstall-worker.shsets up worker nodes
These are preinstalled to match common CKS objectives:
- BOM / SBOM tooling
- Cilium (CNI)
- Falco (runtime security)
- Log in to each VM and become root:
sudo -i- On the control plane VM (
cks-main), run:
curl -fsSL https://raw.githubusercontent.com/parisnakitakejser/PnkCore/refs/heads/main/cncf-certifications/cks/cluster-setup/install-main.sh | bash- On each worker VM (
cks-worker1,cks-worker2), run:
curl -fsSL https://raw.githubusercontent.com/parisnakitakejser/PnkCore/refs/heads/main/cncf-certifications/cks/cluster-setup/install-worker.sh | bash- Keep a copy of the join command/token from the control plane output.
- If a script fails, re-run it after fixing the error (idempotent is best, but not guaranteed).
- This lab is for study. Do not use in production.
- If a VM has multiple NICs or more than one IP address, kubelet may pick the wrong node IP. In that case, set the node IP explicitly on each node that has multiple NICs or ambiguous IPs, then restart kubelet:
echo 'KUBELET_EXTRA_ARGS=--node-ip=192.168.190.137' > /etc/default/kubelet
systemctl restart kubeletTip: find the correct IP with ip -4 addr show and use the VM's primary
interface address.
- Verify VM time is correct and NTP is enabled.
- Check that your VMs can reach each other on the network.
- Ensure you run scripts as root.