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