From 070bdece00730342939c2e813f1652181860328a Mon Sep 17 00:00:00 2001 From: Arnob kumar saha Date: Tue, 9 Jul 2024 13:04:09 +0600 Subject: [PATCH] Install eksctl Signed-off-by: Arnob kumar saha --- cloud.bash | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/cloud.bash b/cloud.bash index 1bc8935..c4ffd64 100755 --- a/cloud.bash +++ b/cloud.bash @@ -23,6 +23,25 @@ else echo "aws is already installed." fi + +if ! command -v eksctl &> /dev/null; then + # https://eksctl.io/installation/ + ARCH=amd64 + PLATFORM=$(uname -s)_$ARCH + + curl -sLO "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_$PLATFORM.tar.gz" + + # (Optional) Verify checksum + curl -sL "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_checksums.txt" | grep $PLATFORM | sha256sum --check + + tar -xzf eksctl_$PLATFORM.tar.gz -C /tmp && rm eksctl_$PLATFORM.tar.gz + + sudo mv /tmp/eksctl /usr/local/bin +else + echo "eksctl is already installed." +fi + + if ! command -v az &> /dev/null; then # https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash