-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support WSL and minikube #523
Comments
@F21, please try the master branch. |
@remoe I am not sure why, but master does not appear to be looking for minikube:
My
|
you don't need minikube on WSL. It should find your windows installation: "minikube.exe". you don't need a symlink. |
My minikube is not installed in WSL. It's installed in Windows, but because I prefer using 1 shell, I made the symlink so that I can execute minikube from WSL without typing |
do you have a wrong docker-env? I can't reproduce on my side: > uname -a
Linux x-PC 4.4.0-17134-Microsoft #112-Microsoft x86_64 x86_64 x86_64 GNU/Linux > cat ~/.minikube/docker-env
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://<ip>:2376"
export DOCKER_CERT_PATH="/mnt/d/Users/<username>/.minikube/certs"
export DOCKER_API_VERSION="1.35" > cat ~/.kube/config apiVersion: v1
clusters:
- cluster:
certificate-authority: /mnt/d/Users/<username>/.minikube/ca.crt
server: https://<ip>:8443
name: minikube
contexts:
- context:
cluster: minikube
user: minikube
name: minikube
current-context: minikube
kind: Config
preferences: {}
users:
- name: minikube
user:
client-certificate: /mnt/d/Users/<username>/.minikube/client.crt
client-key: /mnt/d/Users/<username>/.minikube/client.key > which minikube
> which minikube.exe
/mnt/d/apps/minikube/minikube.exe |
Thanks! That helped a lot. My problem is that I did not have a
Skaffold currently loads the kubernetes config here:
A possible solution could be to transform the paths here https://github.com/GoogleContainerTools/skaffold/blob/master/pkg/skaffold/kubernetes/client.go#L32), however, I am not sure if that's the best way to do this. The reason why I wanted to avoid creating a |
@F21 You can also set KUBECONFIG environment variable to point to your kubeconfig that skaffold should resepect |
@r2d4 I am hoping that I can avoid maintaining 2 sets of kube configs (1 in WSL and 1 on Windows). The main reason is that when you delete a minikube machine and recreate it, the ip address can change. The kubeconfig in WSL would be out of date and skaffold would stop working. However, if I symlink the kubeconfig on Windows into One other solution would be to run the Windows version of skaffold (using skaffold.exe). However, job control does not work in WSL yet, so if you terminate skaffold using |
As this issue is nearing its 2yr anniversary without much in the way of updates, I'm going to close this now as stale. I believe the right way to go about this is:
|
Expected behavior
Skaffold should work under WSL when used with minikube on windows
Actual behavior
Running
skaffold dev
in WSL (windows subsystem for linux) with minikube does not work at the moment.This is because skaffold calls
minikube docker-env --shell none
to get the docker configuration, but thedocker_cert_path
points to a windows path:Information
Some possible solutions:
wslpath
to convertDOCKER_CERT_PATH
into a linux path.~/.kube
folder.~/.skaffold
?)The text was updated successfully, but these errors were encountered: