gcloud and kubectl

This commit is contained in:
Andrejus
2020-07-14 22:19:25 +01:00
parent 7078a8cf71
commit a02b41f9ec
5 changed files with 36 additions and 3 deletions

View File

@@ -1,5 +1,7 @@
apt-transport-https
curl
git
gnupg2
make
neovim
net-tools
@@ -9,4 +11,3 @@ ripgrep
ruby-full
software-properties-common
tmux

15
install/31-gcloud.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
source "$(dirname $0)/utils.sh"
if not_installed "gcloud"; then
echo "Installing gcloud..."
# Add the Cloud SDK distribution URI as a package source
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
# Import the Google Cloud Platform public key
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
update
install google-cloud-sdk
refresh
fi
gcloud --version

18
install/35-kubectl.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
source "$(dirname $0)/utils.sh"
if not_installed "kubectl"; then
echo "Installing kubectl..."
sudo apt-get update && sudo apt-get install -y apt-transport-https gnupg2
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
update
install kubectl
refresh
fi
kubectl version

View File

@@ -112,4 +112,3 @@ install_dir="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
dotfiles_dir="$(dirname "$install_dir")"
source "$dotfiles_dir/files/.bash_profile"
refresh