Command completion for minikube and kubectl on Windows 10

Sandip Chitale
Jan 1, 2018 · 2 min read
> # Let us try completion...> mini<TAB>
> minikube stat<TAB>
> minikube status
No command 'minikube' found, did you mean:
Command 'minitube' from package 'minitube' (universe)
minikube: command not found
> # Command completion works but, command does not run. What gives?> which minkube
> # ^ no ouput
> which minikube.exe
/mnt/c/Program Files (x86)/Kubernetes/Minikube/minikube.exe
> # ^ Good. Ah, that gives us a clue.
alias minikube='minikube.exe'
alias kubectl='kubectl.exe'
> minikube status
minikube: Running
cluster: Running
kubectl: Correctly Configured: pointing to minikube-vm at 192.168.1.31
> kubectl get pods --namespace kube-system
NAME READY STATUS RESTARTS AGE
kube-addon-manager-minikube 1/1 Running 0 5d
kube-dns-86f6f55dd5-7rgdr 3/3 Running 3 12h
kubernetes-dashboard-6wgzs 1/1 Running 1 12h
> minikube.exe completion bash > ~/minikube-completion.bash
> kubectl.exe completion bash > ~/kubectl-completion.bash
source ~/minikube-completion.bash
source ~/kubectl-completion.bash
alias minikube='minikube.exe'
alias kubectl='kubectl.exe'
eval $(minikube docker-env --shell bash)
alias docker='docker.exe -H $DOCKER_HOST --tlsverify'
> docker images
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
gcr.io/google_containers/kubernetes-dashboard-amd64 v1.8.0 55dbc28356f2 5 weeks ago 119MB
gcr.io/google_containers/k8s-dns-sidecar-amd64 1.14.5 fed89e8b4248 3 months ago 41.8MB
gcr.io/google_containers/k8s-dns-kube-dns-amd64 1.14.5 512cd7425a73 3 months ago 49.4MB
gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64 1.14.5 459944ce8cc4 3 months ago 41.4MB
gcr.io/google-containers/kube-addon-manager v6.4-beta.2 0a951668696f 6 months ago 79.2MB
gcr.io/google_containers/pause-amd64 3.0 99e59f495ffa 20 months ago 747kB

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade