Kubernetes Stuck in Starting for Docker Desktop On Mac (M2)
Description
After an update of Docker Desktop to v4.26.1 I am experiencing issues launching a kubernetes cluster. It has been stuck in a starting state for over 30 mins. I had no issue using this feature in my previous version (I believe it was around ~4.18).
I am on a Macbook Pro (M2).
I have already tried a reboot of the computer and a restart of Docker Desktop but this issue still persists.
I also cannot uninstall docker from below. It is just spinning with no response.
Reproduce
Launch Docker Desktop v4.26.1 on Mac.
Expected behavior
Kubernetes cluster should launch after a few minutes of booting
docker version
Client:
Cloud integration: v1.0.35+desktop.5
Version: 24.0.7
API version: 1.43
Go version: go1.20.10
Git commit: afdd53b
Built: Thu Oct 26 09:04:20 2023
OS/Arch: darwin/arm64
Context: desktop-linux
Server: Docker Desktop 4.26.1 (131620)
Engine:
Version: 24.0.7
API version: 1.43 (minimum version 1.12)
Go version: go1.20.10
Git commit: 311b9ff
Built: Thu Oct 26 09:08:15 2023
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.6.25
GitCommit: d8f198a4ed8892c764191ef7b3b06d8a2eeb5c7f
runc:
Version: 1.1.10
GitCommit: v1.1.10-0-g18a0cb0
docker-init:
Version: 0.19.0
GitCommit: de40ad0
docker info
Client:
Version: 24.0.7
Context: desktop-linux
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.12.0-desktop.2
Path: /Users/jmccoy/.docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.23.3-desktop.2
Path: /Users/jmccoy/.docker/cli-plugins/docker-compose
dev: Docker Dev Environments (Docker Inc.)
Version: v0.1.0
Path: /Users/jmccoy/.docker/cli-plugins/docker-dev
extension: Manages Docker extensions (Docker Inc.)
Version: v0.2.21
Path: /Users/jmccoy/.docker/cli-plugins/docker-extension
feedback: Provide feedback, right in your terminal! (Docker Inc.)
Version: 0.1
Path: /Users/jmccoy/.docker/cli-plugins/docker-feedback
init: Creates Docker-related starter files for your project (Docker Inc.)
Version: v0.1.0-beta.10
Path: /Users/jmccoy/.docker/cli-plugins/docker-init
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
Version: 0.6.0
Path: /Users/jmccoy/.docker/cli-plugins/docker-sbom
scan: Docker Scan (Docker Inc.)
Version: v0.26.0
Path: /Users/jmccoy/.docker/cli-plugins/docker-scan
scout: Docker Scout (Docker Inc.)
Version: v1.2.0
Path: /Users/jmccoy/.docker/cli-plugins/docker-scout
Server:
Containers: 43
Running: 7
Paused: 0
Stopped: 36
Images: 67
Server Version: 24.0.7
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc io.containerd.runc.v2
Default Runtime: runc
Init Binary: docker-init
containerd version: d8f198a4ed8892c764191ef7b3b06d8a2eeb5c7f
runc version: v1.1.10-0-g18a0cb0
init version: de40ad0
Security Options:
seccomp
Profile: unconfined
cgroupns
Kernel Version: 6.5.11-linuxkit
Operating System: Docker Desktop
OSType: linux
Architecture: aarch64
CPUs: 10
Total Memory: 7.663GiB
Name: docker-desktop
ID: 103c3b25-3e97-4190-a3cd-05b2a6fce0a8
Docker Root Dir: /var/lib/docker
Debug Mode: false
HTTP Proxy: http.docker.internal:3128
HTTPS Proxy: http.docker.internal:3128
No Proxy: hubproxy.docker.internal
Experimental: false
Insecure Registries:
hubproxy.docker.internal:5555
127.0.0.0/8
Live Restore Enabled: false
WARNING: daemon is not using the default seccomp profile
Diagnostics ID
886FC460-314B-4BCD-AA4F-D8CA578AC39F/20240119015202
Additional Info
No response
Did you find a workaround? Same issue here
I have not. I am still stuck spinning :/. I just moved over to using minikube for the time being because the docker engine still seems to work.
Having the same issue here. MacMini with M1, running MacOS 14.2.1. Fresh download, cannot get k8s to start. Can't seem to kill / restart Docker Desktop while this is spinning. Reset/Restart don't seem to do anything.
Diagnostic ID for my system: 6ea2cc11-f19e-44db-b478-3e300000bdf1/20240119223712
Same issue on 2 different machines. I'm now downgrading to the previous major version.
Upgraded to the latest 4.27.0, reset and restarted K8s and I'm seeing it properly starting up. Not sure what broke in 4.26.1, but it seems to be unbroken in 4.27.0 for me.
https://github.com/docker/for-mac/issues/5027#issuecomment-718076014 I had this issue but found a fix for my situation, I've read it has helped but there are some that say it does not. It worked for me so it might help you.
For me, Kubernetes is failing to start once Docker is restarted (it only works the 1st time).
Something that seems to be working for me is to edit ~/Library/Group Containers/group.com.docker/settings.json and setting
"kubernetesEnabled": false,
"kubernetesInitialInstallPerformed": false,
Then kill Docker Desktop and re-enable Kubernetes
It occurred for me too on Docker 4.28 when I first upgraded to macOS Sonoma 14.4. I had to factory reset Docker Desktop to disable k8s. Enabling k8s after factory reset causes the issue to happen again. When k8s is stuck, Docker Desktop can't quit and I have to kill the processes via Activity Monitor.
Upgrading to macOS Sonoma 14.4.1 seems to fix the issue.
Docker Desktop 4.29 includes a bunch of fixes for the reliability of provisioning the built-in Kubernetes cluster.
Specifically for this issue:
- Startup will not hang indefinitely, it should succeed or fail
- It's now possible to disable Kubernetes while it's starting
- Kubernetes will not block Docker Desktop exit
Please upgrade (use "Check for updates" in Settings if it's not appearing, it was released recently so is still rolling out for automatic updates).
If you have problems after upgrading, try the "Reset Cluster" to re-create it. (This will purge all your Kubernetes workloads!)
Docker Desktop 4.29 includes a bunch of fixes for the reliability of provisioning the built-in Kubernetes cluster.
I was having the same issue, and upgrading to 4.29 worked for me! I couldn't update from Docker Desktop though, because the update would hang forever. I downloaded it from here: https://docs.docker.com/desktop/release-notes/
Same Issue on my Intel Mac.
it takes forever to start & I have to do this every time I start the docker engine. It's sometimes takes almost full day.
Docker Desktop 4.29 includes a bunch of fixes for the reliability of provisioning the built-in Kubernetes cluster.
Specifically for this issue:
- Startup will not hang indefinitely, it should succeed or fail
- It's now possible to disable Kubernetes while it's starting
- Kubernetes will not block Docker Desktop exit
Please upgrade (use "Check for updates" in Settings if it's not appearing, it was released recently so is still rolling out for automatic updates).
If you have problems after upgrading, try the "Reset Cluster" to re-create it. (This will purge all your Kubernetes workloads!)
This worked really well
When I start docker desktop. I disconnect my macos from internet and start kubernetes afterwards and this actually fixes the issue for my. Once my kubernetes cluster has started I connect to internet.
Im still getting this issue on latest version
@sluongng I'm facing the same issue as well.
same issue on windows 11 pro. docker desktop version 4.37.1 (178610)
Same problem here, MacOS 14.6.1 with docker desktop 4.37.2 (179585)
Same problem here, MacOS 14.6.1 with docker desktop 4.37.2 (179585)
do you have try to restart docker engine? i mean like from system tray. right click docker and restart docker engine.
on my windows computer. i can run my local kubernetes after that
Same problem here, MacOS 14.6.1 with docker desktop 4.37.2 (179585)
do you have try to restart docker engine? i mean like from system tray. right click docker and restart docker engine.
on my windows computer. i can run my local kubernetes after that
Many, many times
Still facing the same issue. On a M2 Ultra
Even reset cluster is just in a loop. Nothing seems to work