Abdennour Toumi
1 min readOct 29, 2018

--

You can run kubectl from the host WITHOUT moving the kubeconfig from the vagrant guest machine to the host:

# vagrant ssh -- <your-command-line>
vargrant ssh -- kubectl version
vagrant ssh -- kubectl get nodes
vagrant ssh -- kubectl create -f /vagrant/some-app.yaml
# so on...

Do you like it? You will like the next tips more

alias k='vagrant ssh -- kubectl'

By now, the following command will run smoothly:

k get nodes

Forgot to mention that you need to add the following config to your Vagrantfile

config.vm.synced_folder ".", "/vagrant"

--

--

Abdennour Toumi

Software engineer, Cloud Architect, 5/5 AWS|GCP|PSM Certified, Owner of kubernetes.tn