#!/bin/bash
apt update; apt -y upgrade
echo 'ekshost' > /etc/hostname
curl -LO "https://dl.k8s.io/release/v1.27.0/bin/linux/amd64/kubectl"
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/
curl --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz --directory /tmp
sudo mv /tmp/eksctl /usr/local/bin
curl --output "awscliv2.zip" "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip"
unzip awscliv2.zip
sudo ./aws/install
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 -o install.sh
bash install.sh
rm -f install.sh
helm repo add eks https://aws.github.io/eks-charts
echo 'alias k="kubectl"' > ~ec2-user/.bashrc
reboot now