From 33514d8a4e223ffa4bfd8ff0f0ffbf85e9409ca2 Mon Sep 17 00:00:00 2001 From: Jagrit Thapar Date: Tue, 9 Jul 2024 15:15:00 +0530 Subject: [PATCH] Add common script. --- scripts/0-common.sh | 53 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 scripts/0-common.sh diff --git a/scripts/0-common.sh b/scripts/0-common.sh new file mode 100644 index 0000000..a4bb136 --- /dev/null +++ b/scripts/0-common.sh @@ -0,0 +1,53 @@ +#!/bin/bash + + +cat << "EOF" + _ _ _ _ + (_) (_) | | | | + _ __ _ __ _ _ __ _ | |_ __| | ___ __ __ + | | / _` | / _` | | '__| | | | __| / _` | / _ \ \ \ / / + | | | (_| | | (_| | | | | | | |_ _ | (_| | | __/ \ V / + | | \__,_| \__, | |_| |_| \__| (_) \__,_| \___| \_/ + _/ | __/ | + |__/ |___/ + + Kubernetes Setup Script for All Nodes +EOF + + +# Set Kubernetes version +K8S_VERSION="1.29.0-1.1" + +# Update package index and install dependencies +sudo apt-get update +sudo apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release + +# Disable swap +sudo swapoff -a +sudo sed -i '/ swap / s/^/#/' /etc/fstab + +# Configure kernel parameters +cat <