microk8s Configure your own kubectl on Windows 11
MicroK8s comes with its own packaged version of the kubectl
command for operating Kubernetes. By default, this is accessed through MicroK8s, to avoid interfering with any version which may already be on the host machine (including its configuration). It is run in a terminal like this:
microk8s kubectl
If you are using or want to use a different kubectl command, here is how to configure your own kubectl
client
if you have an other config of your client example for openshift or any other Kubernetes config save your config file before replacing it
cd %USERPROFILE%
mkdir .kube
cd .kube
microk8s config > config
You can use this option also
If you have already configured other Kubernetes clusters, you should merge the output from the microk8s config
with the existing config (copy the output, omitting the first two lines, and paste it onto the end of the existing config using a text editor).