From 1b742bbcaa4c848f51bdcdfbe7d412449f460848 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 | 62 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 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..ad4a137 --- /dev/null +++ b/scripts/0-common.sh @@ -0,0 +1,62 @@ +#!/bin/bash + + +cat << "EOF" + _ _ _ _ + (_) (_) | | | | + _ __ _ __ _ _ __ _ | |_ __| | ___ __ __ + | | / _` | / _` | | '__| | | | __| / _` | / _ \ \ \ / / + | | | (_| | | (_| | | | | | | |_ _ | (_| | | __/ \ V / + | | \__,_| \__, | |_| |_| \__| (_) \__,_| \___| \_/ + _/ | __/ | + |__/ |___/ + + Kubernetes Setup Script for All Nodes +EOF + + +# Set Kubernetes version +# K8S_VERSION="1.30" + +sudo mkdir -p /etc/apt/keyrings + + +# Update package index and install dependencies +sudo apt-get update -y +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 <