Skip to content

Commit

Permalink
fix: update vagrant file to download kubectl
Browse files Browse the repository at this point in the history
The current commands to download kubectl are outdated. Seems that
the repository is not available anymore.
  • Loading branch information
rscampos committed Apr 15, 2024
1 parent ebe62b4 commit 0ecfcc9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Vagrant.configure("2") do |config|
VAGRANT_HOME="/home/vagrant"
GO_VERSION="1.21.6"
OPA_VERSION="v0.63.0"
KUBECTL_VERSION="v1.29"
# silence 'dpkg-preconfigure: unable to re-open stdin: No such file or directory'
export DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -127,10 +128,12 @@ Vagrant.configure("2") do |config|
# kubectl
#
apt-get install --yes apt-transport-https ca-certificates curl
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /etc/apt/keyrings/kubernetes-archive-keyring.gpg
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.d/kubernetes.list
apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl
curl -fsSL https://pkgs.k8s.io/core:/stable:/$KUBECTL_VERSION/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
sudo chmod 644 /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/$KUBECTL_VERSION/deb/ /" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo chmod 644 /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
apt-get install --yes kubectl
echo 'source <(kubectl completion bash)' >> $VAGRANT_HOME/.profile
Expand Down

0 comments on commit 0ecfcc9

Please sign in to comment.