fix(install\_software.sh): add installation of kubectl using curl and make it available system-wide

feat(install\_software.sh): improve script by checking if kubectl is already installed before attempting to install it again
This commit is contained in:
Digital Studium 2024-03-08 00:33:59 +03:00
parent 1af834ec74
commit 3f2c2e10bc
1 changed files with 8 additions and 0 deletions

View File

@ -64,3 +64,11 @@ then
rm -f pet_0.3.6_linux_amd64.deb rm -f pet_0.3.6_linux_amd64.deb
fi fi
# install kubectl
if ! command -v kubectl &> /dev/null
then
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
rm -f kubectl
fi