简体   繁体   中英

Kubernetes - not enabled - with Docker for desktop (windows 10) but “kubectl cluster-info” works? Why?

I uninstalled Docker and installed it again (using the stable release channel).

Is it normal that the command "kubectl cluster-info" shows the output:

Kubernetes master is running at https://localhost:6445

But Kubernetes is not enabled in the Docker settings.

Thanks.

I have reproduced your case.

If you install Docker on Windows10 without any other Kubernetes configuration it will return output:

$ kubectl cluster-info
Kubernetes master is running at http://localhost:8080

When you will enable Kubernetes in Docker for Windows you will receive output:

$ kubectl cluster-info
Kubernetes master is running at http://localhost:6445
KubeDNS is running at https://localhost:6445/api/v1/namespace/kube-system/services/kube-dns/proxy

After reinstall I have checked current kubernetes config and it was as below $ kubectl config view

In config you will still have

...
   server: https://localhost:6445
...

Even after I deleted docker via Control Panel I still had C:\\Users\\%USERNAME%\\.docker and C:\\Users\\%USERNAME%\\.kube directories with config.

To back to default you need to delete Docker, remove manually .docker and .kube directories with configs and install docker.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM