Skip to content

Instantly share code, notes, and snippets.

View rssws's full-sized avatar

Zhongpin Wang rssws

View GitHub Profile
@rssws
rssws / install-k8s-flannel-debian+ubuntu.bash
Last active June 28, 2024 06:55
Install k8s + flannel on debian / ubuntu for master / worker node
install_docker () {
distro=$(cat /etc/*-release | grep DISTRIB_ID | awk -F '=' '{print $2}' | awk '{print tolower($0)}')
distroList=("debian" "ubuntu")
if [[ -n "${distro}" ]]; then
if [[ " ${distroList[*]} " =~ " ${distro} " ]]; then
echo "Installing kubernetes on $distro"
else
echo "Upsupported system distro: ${distro}"
echo "<distro> must be one of: ${distroList[*]}"