I’m puzzled as it installs both microk8s AND kubectl. Why that?
If it wasn’t for the authoritative channel I would have thought at an error, but since it’s from Ubuntu there must be an explanation that I can’t make out…
My question is why did the video suggest to also install kubeclt (sudo snap install kubectl) when, in fact, it already had kubectl from the installation of microk8s.
Why would you need to setup ~/.kube/config on the same machine using microk8s? My setup is microk8’s for internal cluster actions, and kubectl for external actions
I also installed microk8s on my laptop, just to study it. At that point I has kubect as alias to microk8s.kubectl.
Nowhere in the docs I read this is not a recommended setup. From my workstation want to reach any need to must administer.
I can use kubectl from its own snap rather that from microk8s, but I’d like to know why I need to do that. Docs say that microk8s.kubectl should read ~/.kube/config.
The some issues is more of a gut feeling. I have no idea how microk8’s sets up its config, but it “just works” out of the box for local, Looking at my master node it doesn’t even have a ~/.kube/config file, but I can still do microk8s.kubectl commands.
My method isn’t the “recommended setup”, but it seems to work really well.
Reading the docs I do not see how it would work with the ~/.kube/config. It seems to point at the opposite.
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).
I would setup a master config with all your masters and use kubectl, not microk8s kubectl. That would seem to solve your issue