for-mac icon indicating copy to clipboard operation
for-mac copied to clipboard

"Kubernetes is starting…" state never ends

Open plambert opened this issue 8 years ago • 149 comments

  • [ x] I have tried with the latest version of my channel (Stable or Edge)
  • [ x] I have uploaded Diagnostics
  • Diagnostics ID: 804B8977-06D2-4E2A-BB3E-10FBBA99D1F9/20180611-105749

Expected behavior

Within a few minutes of starting Docker for Mac, Kubernetes should be available.

Actual behavior

After several hours, it is still 'starting…'

Information

  • macOS Version: 10.13.5

Diagnostic logs

(Uploaded as 804B8977-06D2-4E2A-BB3E-10FBBA99D1F9/20180611-105749)

Steps to reproduce the behavior

  1. I've quit Docker, rebooted, and started it again, with the same result

plambert avatar Jun 11 '18 20:06 plambert

I have the same problem when update to the version 18.05.0-ce-mac67 (25042).

  • I can use kubectl commands even though Docker for mac is showing Kubernetes is starting....
  • I cannot stop Kubernetes from Preferences... -> Kubernetes.
  • External IP is not attached to LB (only showing <pending>) though I have waited for 20 min.
    • Previous version (18.05.0-ce-mac66) attached localhost as External IP to LB
    • This version only shows <pending> and cURL command like curl http://localhost/some-url returns error: curl: (7) Failed to connect to localhost port 80: Connection refused even though I could use this on the previous version.
$ kgs
NAME                                            TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
crazy-greyhound-nginx-ingress-controller        LoadBalancer   10.96.142.184    <pending>     80:31157/TCP,443:30351/TCP   27m
crazy-greyhound-nginx-ingress-default-backend   ClusterIP      10.103.196.198   <none>        80/TCP                       27m
...

Diagnostic logs: 2E0B1819-92A4-408C-9548-B52A29AAF164/20180612-214950

yuzuco15 avatar Jun 12 '18 12:06 yuzuco15

Experiencing the same after upgrading to macOS 10.13.5. Also see #2985

norbertm121 avatar Jun 13 '18 06:06 norbertm121

I had exactly the same scenario and issue-- even rebooting didn't help. Simply doing the "Reset Kubernetes cluster" on the Reset tab resolved the issue for me. (I didn't have to go so far as to reset to factory defaults.)

tuzla0autopilot4 avatar Jun 13 '18 13:06 tuzla0autopilot4

I didn't realize Reset was a tab! I thought it's a button that would reset everything at once (not just Kubernetes). Resetting the Kubernetes cluster has helped indeed, although I do hope that this is just a one time thing. I was happy to move from minikube to Docker for Mac primarily because minikube releases broke the Kubernetes cluster often. Hopefully this will not be the case with Docker for Mac in the future.

norbertm121 avatar Jun 13 '18 16:06 norbertm121

"Reset Kubernetes cluster" also worked for my case! Thank you so much 😆

yuzuco15 avatar Jun 14 '18 03:06 yuzuco15

the same problem here, kubernetes stuck in starting state screen shot 2018-06-19 at 10 45 06

diagnostic ID 8A8F9D98-E405-4AB4-ABF8-B52AB26DBD61/20180619-104118

Running on OSX version 10.13.4 (17E202)

Docker for Mac: version: 18.05.0-ce-mac67 (1fa4e2acfc1a52f79623add2390604515d32297e)
macOS: version 10.13.4 (build: 17E202)
logs: /tmp/8A8F9D98-E405-4AB4-ABF8-B52AB26DBD61/20180619-104118.tar.gz
[OK]     vpnkit
[OK]     virtualization hypervisor
[OK]     vmnetd
[OK]     dns
[OK]     driver.amd64-linux
[OK]     virtualization VT-X
[OK]     app
[OK]     moby
[OK]     system
[OK]     moby-syslog
[OK]     kubernetes
[OK]     files
[OK]     env
[OK]     virtualization kern.hv_support
[OK]     osxfs
[OK]     moby-console
[OK]     logs
[OK]     docker-cli
[OK]     disk

tjamet avatar Jun 19 '18 08:06 tjamet

@plambert your logs have:

2018-06-11 10:57:46.097206-0700  localhost com.docker.driver.amd64-linux[10740]: Node is not ready: PIDPressure/False kubelet has sufficient PID available
2018-06-11 10:57:47.102135-0700  localhost com.docker.driver.amd64-linux[10740]: Node is not ready: PIDPressure/False kubelet has sufficient PID available
2018-06-11 10:57:48.097550-0700  localhost com.docker.driver.amd64-linux[10740]: Node is not ready: PIDPressure/False kubelet has sufficient PID available
2018-06-11 10:57:49.097725-0700  localhost com.docker.driver.amd64-linux[10740]: Node is not ready: PIDPressure/False kubelet has sufficient PID available
2018-06-11 10:57:50.102071-0700  localhost com.docker.driver.amd64-linux[10740]: Node is not ready: PIDPressure/False kubelet has sufficient PID available

and yet

$ /usr/local/bin/kubectl.docker  --context docker-for-desktop get nodes
NAME                 STATUS    ROLES     AGE       VERSION
docker-for-desktop   Ready     master    7d        v1.10.3

and

$ /usr/local/bin/kubectl.docker  --context docker-for-desktop describe nodes
Name:               docker-for-desktop
Roles:              master
Labels:             beta.kubernetes.io/arch=amd64
                    beta.kubernetes.io/os=linux
                    kubernetes.io/hostname=docker-for-desktop
                    node-role.kubernetes.io/master=
Annotations:        node.alpha.kubernetes.io/ttl=0
                    volumes.kubernetes.io/controller-managed-attach-detach=true
CreationTimestamp:  Mon, 04 Jun 2018 09:36:58 -0700
Taints:             <none>
Unschedulable:      false
Conditions:
  Type             Status  LastHeartbeatTime                 LastTransitionTime                Reason                       Message
  ----             ------  -----------------                 ------------------                ------                       -------
  OutOfDisk        False   Mon, 11 Jun 2018 10:58:31 -0700   Mon, 04 Jun 2018 09:36:44 -0700   KubeletHasSufficientDisk     kubelet has sufficient disk space available
  MemoryPressure   False   Mon, 11 Jun 2018 10:58:31 -0700   Mon, 04 Jun 2018 09:36:44 -0700   KubeletHasSufficientMemory   kubelet has sufficient memory available
  DiskPressure     False   Mon, 11 Jun 2018 10:58:31 -0700   Mon, 04 Jun 2018 09:36:44 -0700   KubeletHasNoDiskPressure     kubelet has no disk pressure
  Ready            True    Mon, 11 Jun 2018 10:58:31 -0700   Mon, 04 Jun 2018 09:36:44 -0700   KubeletReady                 kubelet is posting ready status
  PIDPressure      False   Mon, 11 Jun 2018 10:58:31 -0700   Thu, 07 Jun 2018 22:30:59 -0700   KubeletHasSufficientPID      kubelet has sufficient PID available

I notice that PIDPressure has Status False and yet is mentioned in the main Docker log. I'll check the code which waits for the node ready state to see if it is confused.

djs55 avatar Jun 19 '18 14:06 djs55

I've fixed a bug in the code which failed to notice the node had become Ready. The fix is in the latest development build which can be downloaded form here: https://download-stage.docker.com/mac/bysha1/98b468326d2c579b87b48c47b2ac7e66c1f0a282/Docker.dmg Note that this build is only suitable for testing -- not production. If you get a chance to try it, let me know how it goes. If it still fails, please upload a fresh set of diagnostics.

djs55 avatar Jun 20 '18 15:06 djs55

Hi @djs55 I have tried with my previous Docker.qcow2 image and started your version, I now have the kubernetes is running back! Thanks! hope it works for the others as well :)

tjamet avatar Jun 20 '18 16:06 tjamet

@tjamet thanks a lot for the speedy confirmation!

djs55 avatar Jun 21 '18 13:06 djs55

For what it is worth, Kubernetes is now running successfully without your patch @djs55 on version 18.05.0-ce-mac67 (25042)

I have edge installed via Homebrew. Here is what I did step-by-step:

  1. Completely removed docker
  2. Uninstalled it via homebrew
  3. Reinstalled it via homebrew

Not sure why this works and how it doesn't 'require' your patch, but it something others might try if they need a 'production' build.

bitmvr avatar Jul 11 '18 13:07 bitmvr

@djs55 I still have "Kubernetes is starting..." running your dmg build. Diagnostic ID: 29A56A58-476F-4D93-B4E0-B518C213C244/20180726-012938

markhilton avatar Jul 26 '18 08:07 markhilton

I had the same issue, found out my /etc/hosts was empty. Once I restored it original values, Kubernetes is now starting successfully.

arafatmohammed avatar Aug 17 '18 14:08 arafatmohammed

what worked for me is a reset of ALL data, then recreate it all.

cicorias avatar Aug 29 '18 02:08 cicorias

I also have this issue. Kubernetes worked fine one time, but after I had to reboot, it got stuck in "Kubernetes is starting".

I tried these steps:

  • Reboot again
  • Reset Kubernetes
  • Reset Disk
  • Reset to factory defaults
  • Uninstall/Reinstall
  • Uninstall/Install edge release
  • Uninstall/Reinstall edge with manually removing stuff smelling like docker/kubernetes from my home directory

But it still won't start.

$ kubectl cluster-info 
Kubernetes master is running at https://localhost:6443

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Unable to connect to the server: EOF
$ kubectl cluster-info dump
Unable to connect to the server: EOF

MartinEmrich avatar Sep 03 '18 15:09 MartinEmrich

Yep, getting the same thing. Latest release for macOS (stable). Will test edge too.

avocade avatar Sep 11 '18 13:09 avocade

Failing on edge too, tried all means of getting it running (yes I uninstalled homebrew too). Moving back to minikube for now.

avocade avatar Sep 17 '18 14:09 avocade

Same as above: stuck in starting after updating to latest macOS release on both stable and edge channels.

aditzel avatar Sep 20 '18 21:09 aditzel

I had it running fine on my mac but but after upgrading my OS to "High Sierra 10.13.6", running into same issue. Have already tried a few different stable and edge versions.

keshavgupt avatar Sep 20 '18 21:09 keshavgupt

Same here, testing both versions stable/edge, OS HS 10.13.6

thgsn avatar Sep 23 '18 09:09 thgsn