Skip to content

Kubernetes Stuck in Starting for Docker Desktop On Mac (M2) #7136

Closed

Description

@joelmccoy

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.
image

I also cannot uninstall docker from below. It is just spinning with no response.

image

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

Activity

  1. 3lcarry commented on Jan 19, 2024

    @3lcarry

    Did you find a workaround? Same issue here

  2. joelmccoy commented on Jan 19, 2024

    @joelmccoy
    Author

    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.

  3. coredumpster commented on Jan 19, 2024

    @coredumpster

    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

  4. anthonyalayo commented on Jan 22, 2024

    @anthonyalayo

    Same issue on 2 different machines. I'm now downgrading to the previous major version.

  5. coredumpster commented on Jan 29, 2024

    @coredumpster

    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.

  6. self-assigned this
    on Feb 21, 2024
  7. teckglobal commented on Mar 21, 2024

    @teckglobal

    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.

  8. flin-8 commented on Mar 27, 2024

    @flin-8

    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

  9. sonnykt commented on Apr 1, 2024

    @sonnykt

    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.

  10. 6 remaining items

  11. sluongng commented on Jan 10, 2025

    @sluongng

    Image

    Im still getting this issue on latest version

  12. russell-corp commented on Jan 13, 2025

    @russell-corp

    @sluongng I'm facing the same issue as well.

  13. archermask commented on Jan 26, 2025

    @archermask

    same issue on windows 11 pro. docker desktop version 4.37.1 (178610)

    Image

  14. patrickheidotting commented on Jan 27, 2025

    @patrickheidotting

    Same problem here, MacOS 14.6.1 with docker desktop 4.37.2 (179585)

  15. archermask commented on Jan 28, 2025

    @archermask

    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

  16. patrickheidotting commented on Jan 28, 2025

    @patrickheidotting

    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

  17. shankardeepak22 commented on Feb 20, 2025

    @shankardeepak22

    Still facing the same issue. On a M2 Ultra

    Image

    Even reset cluster is just in a loop. Nothing seems to work

  18. jpelkonen commented on Feb 26, 2025

    @jpelkonen

    This used to work for me, but now I had to:

    1. open ~/Library/Group Containers/group.com.docker/settings-store.json
    2. change these from true to false
      "KubernetesEnabled": false,
      "KubernetesInitialInstallPerformed": false,
    

    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

  19. mluttmann commented on Mar 10, 2025

    @mluttmann

    This used to work for me, but now I had to:

    1. open ~/Library/Group Containers/group.com.docker/settings-store.json
    2. change these from true to false
      "KubernetesEnabled": false,
      "KubernetesInitialInstallPerformed": false,
    

    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

    I needed additional steps to fix the problem:

    1. Stop/kill Docker Desktop
    2. Open ~/Library/Group Containers/group.com.docker/settings-store.json
    3. Change these from true to false
      "KubernetesEnabled": false,
      "KubernetesInitialInstallPerformed": false,
    
    1. Start Docker Desktop
    2. Run docker system prune -a to delete stopped containers which includes those needed for kubernetes
    3. Re-enable kubernetes in the settings which will re-downloaded containers for kubernetes
  20. davidaparicio commented on Mar 13, 2025

    @davidaparicio

    Same issue here, with the latest Docker Desktop update (4.39.0 (184744)) on M3 Pro 18Go / Sequoia 15.3.2
    The workaround worked for me (open/editing ~/Library/'Group Containers'/group.com.docker/settings-store.json) 👍

  21. zakblacki commented on Jun 11, 2025

    @zakblacki

    Same issue on windows

  22. cmpxchg16b-nop commented on Aug 14, 2025

    @cmpxchg16b-nop

    If your mac has low available disk space, or the 'Disk usage limit' in 'Settings' 'Resource Allocation' is too low:

    Image

    can make the the storage-provisioner failed to start, even Docker Desktop for Mac said that the Kubernetes is still starting, you can still use kubectl get pod -A command to list all containers, then, describe the storage-provisioner in kube-system ns, you can find something:

    kubectl describe pod storage-provisioner -n kube-system
    Name:             storage-provisioner
    Namespace:        kube-system
    Priority:         0
    Service Account:  storage-provisioner
    Node:             docker-desktop/192.168.65.3
    Start Time:       Thu, 14 Aug 2025 19:23:49 +0800
    Labels:           component=storage-provisioner
    Annotations:      <none>
    Status:           Failed
    Reason:           Evicted
    Message:          The node was low on resource: ephemeral-storage. Threshold quantity: 2519393380, available: 2032272Ki. 
    IP:               
    IPs:              <none>
    Containers:
      storage-provisioner:
        Container ID:  
        Image:         docker/desktop-storage-provisioner:v2.0
        Image ID:      
        Port:          <none>
        Host Port:     <none>
        Args:
          /var/lib/k8s-pvs
        State:          Terminated
          Reason:       ContainerStatusUnknown
          Message:      The container could not be located when the pod was terminated
          Exit Code:    137
          Started:      Mon, 01 Jan 0001 00:00:00 +0000
          Finished:     Mon, 01 Jan 0001 00:00:00 +0000
        Ready:          False
        Restart Count:  0
        Environment:    <none>
        Mounts:
          /var/lib/k8s-pvs from pvs (rw)
          /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-zn2hc (ro)
    Conditions:
      Type                        Status
      DisruptionTarget            True 
      PodReadyToStartContainers   False 
      Initialized                 True 
      Ready                       False 
      ContainersReady             False 
      PodScheduled                True 
    Volumes:
      pvs:
        Type:          HostPath (bare host directory volume)
        Path:          /var/lib/k8s-pvs
        HostPathType:  Directory
      kube-api-access-zn2hc:
        Type:                    Projected (a volume that contains injected data from multiple sources)
        TokenExpirationSeconds:  3607
        ConfigMapName:           kube-root-ca.crt
        ConfigMapOptional:       <nil>
        DownwardAPI:             true
    QoS Class:                   BestEffort
    Node-Selectors:              <none>
    Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                                 node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
    Events:
      Type     Reason     Age   From               Message
      ----     ------     ----  ----               -------
      Normal   Scheduled  13m   default-scheduler  Successfully assigned kube-system/storage-provisioner to docker-desktop
      Warning  Evicted    13m   kubelet            The node was low on resource: ephemeral-storage. Threshold quantity: 2519393380, available: 2032272Ki.
    

    here it says 'Evicted' and the resource 'ephemeral-storage' is lower than the threshold.

    Here is how I solved this problem:

    • Remove some large and un-used files or no-longer needed big-size applications
    • Increase the 'Disk usage limit' in the Docker Settings
    • kill all non-Ready containers in 'kube-system' ns, just kubectl delete pod xxx -n kube-system, i know that Docker is saying Kubernetes is not yet started, but just try using the kubectl command anyway
    • Restart the Docker Desktop for Mac
  23. Glavotaner commented on Sep 23, 2025

    @Glavotaner

    My issue seems to have been that I had installed kubectl via homebrew, so it was in opt/homebrew.

    Whereas the docs for the K8S module states that kubectl must be at usr/local/bin https://docs.docker.com/desktop/features/kubernetes/#install-and-turn-on-kubernetes

    So I ran brew remove kubectl - then I planned to install it as a binary, and place it into the appropriate folder, but I found that it was already installed there.

  24. the-laughing-monkey commented on Oct 22, 2025

    @the-laughing-monkey

    Switching from Kubeadm to Kind fixed it for me in v4.48.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions