Docker Community Forums

Share and learn in the Docker community.

Docker Kubernetes: scheduler and controller-manager unhealthy

I am running Docker Desktop 4.1.1 (69879) on Windows 10. I just activated the Kubernets cluster in the Docker settings and realized that ‘kubectl get cs’ returns the following:

controller-manager
Unhealthy
Get “http://127.0.0.1:10252/healthz”: dial tcp 127.0.0.1:10252: connect: connection refused

scheduler
Unhealthy
Get “http://127.0.0.1:10251/healthz”: dial tcp 127.0.0.1:10251: connect: connection refused

etcd-0
Healthy
{“health”:“true”}

How can I make the first 2 components also work properly?

Regards,
Steffen

kubectl get cs is deprecated and it uses a hardcoded HTTP port to check health status. I don’t know what the real alternative is using one command but you can check health status with kubectl describe pod -n kube-system PODNAME. You can see the actual URL in there:

kubectl describe pod -n kube-system kube-scheduler-docker-desktop

    Liveness:     http-get https://127.0.0.1:10259/healthz delay=10s timeout=15s period=10s #success=1 #failure=8
    Startup:      http-get https://127.0.0.1:10259/healthz delay=10s timeout=15s period=10s #success=1 #failure=24

I recommend looking for custom health check solutions but until that you can do this with desktop:

docker run --network host -it curlimages/curl:7.79.1 curl -k https://127.0.0.1:10259/healthz

OK, got it. Thank you for your feedback.