Docker stack ls does not work -- failed to find a Stack API version

docker stack commands all fail with the message failed to find a Stack API version on Docker Desktop Mac. See: failed to find a Stack API version · Issue #4966 · docker/for-mac · GitHub

$ docker version
Client: Docker Engine - Community
Cloud integration: 1.0.2
Version: 19.03.13
API version: 1.40
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 16:58:31 2020
OS/Arch: darwin/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 19.03.13
API version: 1.40 (minimum version 1.12)
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 17:07:04 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.3.7
GitCommit: 8fba4e9a7d01810a393d5d25a3621dc101981175
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
Kubernetes:
Version: Unknown
StackAPI: Unknown

How does the output of docker info --format '{{.Swarm.LocalNodeState}}' look like?

docker info --format '{{.Swarm.LocalNodeState}}' is inactive because I am not trying to use Swarm, I am trying to use Kubernetes.

Got it, I wrongly assumed Stack API referes to Swarm stacks, thus checking if Swarm is initiated would have made sense.

There is nothing that i can contribute here. I am not using a Mac, though on Docker Desktop for Windows, Kubernetes needs to be enabled specifcly.

Good luck!

Lots of Windows users seeing the same thing on https://github.com/docker/for-mac/issues/4966 Kubernetes needs to be configured on both Mac and Windows desktop but doing so does not solve this problem on both platforms.

I doubt that posting issues in this forum will result in anything else than users trying to support users.
The Github project’s issue page is still the best place to get attention.

One more thing: I personaly would skip this useless compose to kubernetes service completly. Even though it makes the docker services tranlate to kubernetes deployments/pods and exposing ports via services…it does not remotely cover what Kuberentes is able to provide. Pods and services are very simple manifests, which can be learned in short time. From my perspective this “translater” is a useless feature.

Still, there is no excuse for Docker to leave ut broken…

1 Like

Quoting that so that it stands out as being important.