Don't wanna be here? Send us removal request.
Text
Hello!
Not sure how successful this will be but I’m sitting at work learning about something...thinking...”It would be nice to document this for the future and while I’m at it maybe someone else might find this useful.” Now, what platform would be best to do this? Not sure so trying this out...
This will be something I learn on the fly ;-) Most of this will focus on techy stuff but maybe expand.
So here it goes...
I’m in the process of learning more about Kubernetes and getting this going on my Windows 10 laptop is relatively easy. Thing is I am running the Windows Subsystem for Linux (WSL) and like to run everything through there. Found this nice little blog. https://devkimchi.com/2018/06/05/running-kubernetes-on-wsl/ and following the steps gets me where I need to be.
However, in working through the steps I come across the following...
And let kubectl know to use the Docker for Windows context.
kubectl config use-context docker-for-desktop
and I’m like
“How do I know to use docker-for-desktop?”
So knowing that kubectl is already set up in my Windows env, I run kubectl config --help
C:\Users\jacoj1> kubectl config --help
which provides me with a list of commands
Excerpt of output...
Available Commands: current-context Displays the current-context delete-cluster Delete the specified cluster from the kubeconfig delete-context Delete the specified context from the kubeconfig get-clusters Display clusters defined in the kubeconfig get-contexts Describe one or many contexts rename-context Renames a context from the kubeconfig file. set Sets an individual value in a kubeconfig file set-cluster Sets a cluster entry in kubeconfig set-context Sets a context entry in kubeconfig set-credentials Sets a user entry in kubeconfig unset Unsets an individual value in a kubeconfig file use-context Sets the current-context in a kubeconfig file view Display merged kubeconfig settings or a specified kubeconfig file
So then I can issue current-context and viola!
C:\Users\jacoj1> kubectl config current-context docker-for-desktop
Docker Desktop is great as it does all the setup of Kubernetes which allows you to start using it right away. As such you might miss out on some setup/config steps that reinforce some of the concepts. You can learn more about context here. https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/
1 note
·
View note