Install kubectl on ubuntu (WSL) and use kubectl config from Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Receives your Windows username as only parameter. | |
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.16.0/bin/linux/amd64/kubectl | |
chmod +x ./kubectl | |
sudo mv ./kubectl /usr/local/bin/kubectl | |
windowsUser=$1 | |
mkdir -p ~/.kube | |
ln -sf "/mnt/c/users/$windowsUser/.kube/config" ~/.kube/config | |
kubectl version |
This is great, very helpful! Thanks
i did the above steps but it says:
The connection to the server localhost:8080 was refused - did you specify the right host or port?
i did the above steps but it says: The connection to the server localhost:8080 was refused - did you specify the right host or port?
Check your .kube/config
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice work, thx~