![]() 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). If you have not already configured kubectl on the host for other clusters, you can open a ‘cmd’ Command Prompt and run the following: cd %USERPROFILE% Running the following command will output the kubeconfig file from MicroK8s: microk8s config To install the Windows version of kubectl, see the official documentation. There are some advantages to running the Windows native version of kubectl, notably when working with files(which otherwise need to be copied to/from the VM). MicroK8s comes with its own kubectl command, which can be accessed like this: microk8s kubectl If you have not already configured kubectl on the host, you can just open a terminal and generate the required config : cd $HOME If you’d prefer to use your host’s kubectl command, running the following command will output the kubeconfig file from MicroK8s. If you are using or want to use a different kubectl command, see the relevant sections below for your OS Linux It is run in a terminal like this: microk8s kubectl By default, this is accessed through MicroK8s, to avoid interfering with any version which may already be on the host machine (including its configuration). ![]() MicroK8s comes with its own packaged version of the kubectl command for operating Kubernetes. ![]()
0 Comments
Leave a Reply. |