Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update vagrant file to download kubectl #3977

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading