Downloading and installing Docker for Mac. For now, Kubernetes is only available on Docker for Mac 17.12 CE Edge (special Docker version for new and experimental features), so make sure you install the Edge version. On your Mac, double-click the Docker.dmg file and begin the installation process as instructed.
Expected behavior Docker Engine and Kubernetes should start up within a reasonable time. Actual behavior It's been 15 minutes and Kubernetes hasn't yet started up Docker Engine started as expected. Information I'm on the Edge release and I just upgraded to 18.02.0-ce-rc1-mac50 when the issue started. Diagnose output: Docker for Mac: version: 18.02.0-ce-rc1-mac50 (e1912a8c46ae6f60a85d277f7b8d210dc9670b28) macOS: version 10.12.6 (build: 16G1114) logs: /tmp/5F73B1D4-3EBF-408F-95D6-E28BDE7A7CEF/20129.tar.gz OK db.git OK vmnetd OK dns OK driver.amd64-linux OK virtualization VT-X OK app OK moby OK system OK moby-syslog OK kubernetes OK env OK virtualization kern.hvsupport OK slirp OK osxfs OK moby-console OK logs OK docker-cli OK menubar OK disk Steps to reproduce the behavior Not sure if reproducible, but these are the steps I went through. Early January switch from Stable to Edge releases of Docker to get 17.12 (if I remember correctly). Enable Kubernetes. Wait until today.
Upgrade Docker to 18.02. That does NOT solve anything. I have removed completely Docker and reinstall it. Kubernetes still do NOT start! The kubelet.err.log is: - 88 - And now?? You release something that you even try on a Mac OSX?
Seriously, you will have the same issue, you too. I had previously allocated 2GB RAM and 2 CPU cores to the Docker Engine but needed to increase these limits today because a project needed more resources. This of course triggers a restart of Docker Engine and Kubernetes, but now nothing starts up. Aha, I was not aware of the Factory reset button inside the preferences and proceeded to remove the app from Applications/ before installing it again. Not entirely sure how one is supposed to actually uninstall apps from a Mac. Anyways, once 'reinstalled' Edge the naive way I still got the same issues as described above.
Currently trying to do a factory reset from within the application, but it doesn't seem to be doing anything. I tried quitting Docker mid-process since it took so long (5+ minutes without any changes) and then starting again. Nothing new happened. I decided to open up the advanced features and click reset daemon settings in hopes that it would trigger some other resets and hopefully be able to start up again.
Last option I see is to try and do a Uninstall from within the preferences menu. Clicked it, looks a bit stuck as well. Could it be because Docker and Kubernetes aren't starting properly, or at least Docker Engine?
I chose a bold move and force quit the hyperkit process while the uninstall window was open, since it looked like it was stuck. That gave me a message almost immediately stating the uninstall was successful. Well, that was unexpected. Well, let's install Docker Edge once again and see how it looks.
It asked for privileges, and asks me to log in with my Docker ID. That feels just about right!
And look at that, Docker Engine is running! ? Diagnose looks good. But it did initially as well when there were Kube issues. Let's check that commands are working properly. Still looking good. $ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES Kubernetes also works!
How I was able to re-install Docker Go to Docker preferences, click Reset - Uninstall. While the bar is stuck, open Activity Monitor and force quit hyperkit. I wrote this as I went along, luckily it ended with a fixed issue.
Not sure what went wrong along the way, but this is how I fixed my issue at least. I had the exact same issue, namely Kubernetes being stuck in the 'Kubernetes is starting.' State after upgrading to 18.05.0-ce-mac67 (25042). What solved it for me was: Preferences = Reset = Reset Kubernetes cluster.
However, after that I got The connection to the server localhost:6443 was refused - did you specify the right host or port? When trying to use Kubectl. Simply restarting Docker for Mac from the main menu fixed that and now everything is back up and running. So to summarize:. Click on the Docker icon, select Preferences, select Reset, click on Reset Kubernetes cluster. Click on the Docker icon, click on Restart Hope this helps in other cases as well. FWIW, this is still happening (it may be indeed related to switching the current-context, but not really clear why): Version 18.05.0-ce-mac67 (25042) Resetting with the 'nuclear option' and reinstalling seems to fix this; switching context and then back seems to 'work as intended.'
I believe that the root cause is related to current-context pointing to something other than docker-for-desktop during an update (or a restart?) then Docker for Mac gets confused and tries to install pods to the wrong cluster. To verify this, after K8s started successfully, I switched context to another (work-related) cluster; did a Docker/Restart and observed the 'Kubernetes starting.' Hanging there for quite a while - switched back to the docker-for-desktop context, executed another restart, and now K8s is happily 'Running'. My suggestion would be to execute a check on the current context upon install/update/restart and warn the user (a 'forced' context switch may be undesirable, perhaps). Solution for 18.06 edge. I tried to restart.
I tried switching context and restarting. At this point, docker ps would show only 2 containers running. cluster-info shows EOF $ kubectl cluster-info Kubernetes master is running at To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'. Also kept having a similar looking issue (with Version 2.0.0.0-beta1-mac75 (27117)) and had to click the Reset Kubernetes cluster button in the Reset panel of the Docker for Mac settings.
Edit: k8s apiserver logs from before the reset (not sure that'll shed any light on what was b0rked): $ docker logs -follow 87170c4cc86e Flag -admission-control has been deprecated, Use -enable-admission-plugins or -disable-admission-plugins instead. Will be removed in a future version. Flag -insecure-port has been deprecated, This flag will be removed in a future version. I1108 23:27 1 server.go:135 Version: v1.10.3 I1108 23:48 1 server.go:724 external host was not specified, using 192.168.65.3 I1108 23:54 1 featuregate.go:190 feature gates: mapInitializers:true I1108 23:05 1 initialization.go:90 enabled Initializers feature as part of admission plugin setup I1108 23:11 1 plugins.go:149 Loaded 10 admission controller(s) successfully in the following order: NamespaceLifecycle,LimitRanger,ServiceAccount,NodeRestriction,DefaultTolerationSeconds,DefaultStorageClass,MutatingAdmissionWebhook,Initializers,ValidatingAdmissionWebhook,ResourceQuota. I1108 23:36 1 plugins.go:149 Loaded 10 admission controller(s) successfully in the following order: NamespaceLifecycle,LimitRanger,ServiceAccount,NodeRestriction,DefaultTolerationSeconds,DefaultStorageClass,MutatingAdmissionWebhook,Initializers,ValidatingAdmissionWebhook,ResourceQuota. I1108 23:72 1 master.go:228 Using reconciler: master-count W1108 23:21 1 genericapiserver.go:342 Skipping API batch/v2alpha1 because it has no resources.
W1108 23:78 1 genericapiserver.go:342 Skipping API rbac.authorization.k8s.io/v1alpha1 because it has no resources. W1108 23:09 1 genericapiserver.go:342 Skipping API storage.k8s.io/v1alpha1 because it has no resources. W1108 23:55 1 genericapiserver.go:342 Skipping API admissionregistration.k8s.io/v1alpha1 because it has no resources.
. I have tried with the latest version of my channel (Edge). I have uploaded Diagnostics. Diagnostics ID: CFEA972F-586B-4BD1-AE0C-BF698AA89BB6/20129 Expected behavior Low idle CPU usage after enabling Kubernetes. Actual behavior High idle CPU usage after enabling Kubernetes (no matter with Kubernetes or Swarm selected as orchestrator).
If I reduce the number of cores under Docker-Preferences-Advanced to something like '1', then the overall com.docker.hyperkit CPU utilization goes down proportionally. If I disable Kubernetes local cluster, the CPU utilization pretty much disappears from the Mac Activity Monitor. I think people have to buffer expectations when using k8s on a Mac with Docker. It should be for experimentation and minimal developer activities. Otherwise, use k8s in a real, provisioned environment to save your Mac from burning through CPU and the associated heat it generates.