Skip to content

Commit

Permalink
fix: update vagrant file to download kubectl (#3977)
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 52c0ff9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 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,9 +128,11 @@ 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 install -y apt-transport-https ca-certificates curl
curl -fsSL https://pkgs.k8s.io/core:/stable:/$KUBECTL_VERSION/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
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/ /" | tee /etc/apt/sources.list.d/kubernetes.list
chmod 644 /etc/apt/sources.list.d/kubernetes.list
apt-get update
apt-get install --yes kubectl
echo 'source <(kubectl completion bash)' >> $VAGRANT_HOME/.profile
Expand Down

0 comments on commit 52c0ff9

Please sign in to comment.