Skip to content

Instantly share code, notes, and snippets.

@amircloner
amircloner / k8s-prepare-node.sh
Created August 27, 2024 09:38 — forked from hossainemruz/k8s-prepare-node.sh
Bash script to automatically install and configure container runtime, cni plugins etc
#!/bin/bash
set -eou pipefail
#========== Step 1: Disable Swap ============
echo "Disabling Swap......."
sudo swapoff -a
sudo sed -i '/^[^#]/ s/\(^.*swap.*$\)/#\1/' /etc/fstab
free -h
echo ""