Skip to content

MuNeNICK/setup-k8s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

104 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes Cluster Management Scripts

ShellCheck & Unit Tests

Set up or tear down a Kubernetes cluster with a single command. Follows the official kubeadm installation guide. Distro auto-detection means the same command works on Ubuntu, Rocky Linux, Arch, Alpine, and more.

Supports single-node, multi-node, and HA (high availability) clusters with kube-vip. Proxy mode, CRI (containerd/CRI-O), version pinning, and many other options are fully configurable.

Quick Start

Initialize Cluster

curl -fsSL https://github.com/MuNeNICK/setup-k8s/raw/main/setup-k8s.sh | sudo sh -s -- init

Join Cluster

curl -fsSL https://github.com/MuNeNICK/setup-k8s/raw/main/setup-k8s.sh | sudo sh -s -- \
  join \
  --join-token <token> \
  --join-address <address> \
  --discovery-token-hash <hash>

Deploy Multi-Node Cluster via SSH

curl -fsSL https://github.com/MuNeNICK/setup-k8s/raw/main/setup-k8s.sh | sh -s -- \
  deploy \
  --control-planes root@192.168.1.10 \
  --workers root@192.168.1.11,root@192.168.1.12

Deploy HA Cluster

curl -fsSL https://github.com/MuNeNICK/setup-k8s/raw/main/setup-k8s.sh | sh -s -- \
  deploy \
  --control-planes root@192.168.1.10,root@192.168.1.11,root@192.168.1.12 \
  --workers root@192.168.1.20 \
  --ha-vip 192.168.1.100

Cleanup

curl -fsSL https://github.com/MuNeNICK/setup-k8s/raw/main/setup-k8s.sh | sudo sh -s -- cleanup --force

Documentation

Document Description
Installation Guide Cluster init/join examples, CRI/proxy options, prerequisites
Cleanup Guide Cleanup procedures, node drain steps
Configuration Proxy modes (iptables/IPVS/nftables), certificate renewal, CNI setup, single-node config
Option Reference All setup-k8s.sh options
Troubleshooting Common issues, distribution-specific notes

Support

  • Issues and feature requests: Open an issue in the repository
  • Documentation updates: Submit a pull request

Distribution Test Results

Tested with Kubernetes v1.35 (latest stable).

Distribution Version Test Date Status Notes
Ubuntu 24.04 LTS 2026-02-21 ✅ Tested
Ubuntu 22.04 LTS 2026-02-21 ✅ Tested
Debian 13 (Trixie) 2026-02-21 ✅ Tested
Debian 12 (Bookworm) 2026-02-21 ✅ Tested
Debian 11 (Bullseye) 2026-02-21 ✅ Tested
RHEL 9 - 🚫 Untested Subscription required
RHEL 8 - 🚫 Untested Subscription required
CentOS Stream 10 2026-02-21 ✅ Tested
CentOS Stream 9 2026-02-21 ✅ Tested
Rocky Linux 10 2026-02-21 ✅ Tested
Rocky Linux 9 2026-02-21 ✅ Tested
Rocky Linux 8 2026-02-21 ⚠️ Partial cgroups v1 only ¹
AlmaLinux 10 2026-02-21 ✅ Tested
AlmaLinux 9 2026-02-21 ✅ Tested
AlmaLinux 8 2026-02-21 ⚠️ Partial cgroups v1 only ¹
Oracle Linux 9 2026-02-21 ✅ Tested
Fedora 43 2026-02-21 ✅ Tested
openSUSE Tumbleweed 2026-02-21 ✅ Tested
openSUSE Leap 16.0 2026-02-21 ✅ Tested
SLES 15 SP5 - 🚫 Untested Subscription required
Alpine Linux 3.23 2026-02-23 ✅ Tested OpenRC, cgroupfs
Arch Linux Rolling 2026-02-21 ✅ Tested
Manjaro Rolling - 🚫 Untested No cloud image

Status Legend:

  • ✅ Tested: Fully tested and working
  • ⚠️ Partial: Works with some limitations or manual steps
  • ❌ Failed: Not working or major issues
  • 🚫 Untested: Not yet tested

Notes: ¹ Kubernetes 1.34+ requires cgroups v2 (cgroups v1 support was removed). Use --kubernetes-version 1.33 or earlier on these distributions.

Note: Test dates and results should be updated regularly. Please submit your test results via issues or pull requests.

About

A comprehensive set of scripts for managing Kubernetes clusters on various Linux distributions, including installation, configuration, and cleanup operations.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages