The Wayback Machine - https://web.archive.org/web/20260211142328/https://github.com/docker/for-mac/issues/6328
Skip to content

docker desktop installs kubectl and overwrites existing even though kubernetes integrations are disabled #6328

@zswanson

Description

@zswanson
  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics
  • Diagnostics ID:

Expected behavior

Installing docker desktop for mac, either through the official dmg image or homebrew install docker should install docker desktop, with kubernetes integrations disabled initially (which is the current default behavior) and not install kubectl

Actual behavior

The docker desktop installer installs its own kubectl and creates 2 soft link targets in /usr/local/bin for kubectl and kubectl.docker. Kubernetes integrations in docker desktop are still disabled when inspected immediately after installation. Due to #6327 this version of kubectl doesn't work with corporate vpn and we have to manually remove the soft links. In some cases after either a) a docker desktop update; b) restarting docker desktop, I have also observed that Docker Desktop will re-create the softlinks, leading to the same problem.

Information

  • macOS Version:
  • Intel chip or Apple chip:
  • Docker Desktop Version:

Output of /Applications/Docker.app/Contents/MacOS/com.docker.diagnose check

Note: I have already removed the kubectl softlinks due to the issue mentioned in #6327

[PASS] DD0027: is there available disk space on the host?
[PASS] DD0028: is there available VM disk space?
[PASS] DD0031: does the Docker API work?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0016: is the LinuxKit VM running?
[PASS] DD0001: is the application running?
[PASS] DD0018: does the host support virtualization?
[PASS] DD0017: can a VM be started?
[FAIL] DD0015: are the binary symlinks installed? looking for /usr/local/bin/kubectl: lstat /usr/local/bin/kubectl: no such file or directory
[PASS] DD0003: is the Docker CLI working?
[PASS] DD0013: is the $PATH ok?
[PASS] DD0007: is the backend responding?
[PASS] DD0014: are the backend processes running?
[PASS] DD0008: is the native API responding?
[PASS] DD0009: is the vpnkit API responding?
[PASS] DD0010: is the Docker API proxy responding?
[FAIL] DD0012: is the VM networking working? network checks failed: failed to ping host: exit status 1
[2022-05-27T18:14:11.697727000Z][com.docker.diagnose][I] ipc.NewClient: d1f4489b-diagnose-network -> <HOME>/Library/Containers/com.docker.docker/Data/diagnosticd.sock diagnosticsd
[common/pkg/diagkit/gather/diagnose.runIsVMNetworkingOK()
[	common/pkg/diagkit/gather/diagnose/network.go:34 +0xd4
[common/pkg/diagkit/gather/diagnose.(*test).GetResult(0x102ec80e0)
[	common/pkg/diagkit/gather/diagnose/test.go:46 +0x44
[common/pkg/diagkit/gather/diagnose.Run.func1(0x102ec80e0)
[	common/pkg/diagkit/gather/diagnose/run.go:17 +0x44
[common/pkg/diagkit/gather/diagnose.walkOnce.func1(0x2?, 0x102ec80e0)
[	common/pkg/diagkit/gather/diagnose/run.go:140 +0x84
[common/pkg/diagkit/gather/diagnose.walkDepthFirst(0x1, 0x102ec80e0, 0x140007c1728)
[	common/pkg/diagkit/gather/diagnose/run.go:146 +0x3c
[common/pkg/diagkit/gather/diagnose.walkDepthFirst(0x0, 0x20?, 0x140007c1728)
[	common/pkg/diagkit/gather/diagnose/run.go:149 +0x78
[common/pkg/diagkit/gather/diagnose.walkOnce(0x1029ac0a0?, 0x1400036f890)
[	common/pkg/diagkit/gather/diagnose/run.go:135 +0x8c
[common/pkg/diagkit/gather/diagnose.Run(0x102ec8260, 0x10227bfa0?, {0x1400036fb08, 0x1, 0x1})
[	common/pkg/diagkit/gather/diagnose/run.go:16 +0x178
[main.checkCmd({0x140001b6010?, 0x6?, 0x4?}, {0x0, 0x0})
[	common/cmd/com.docker.diagnose/main.go:132 +0xe0
[main.main()
[	common/cmd/com.docker.diagnose/main.go:98 +0x308
[2022-05-27T18:14:11.697828000Z][com.docker.diagnose][I] (5f03f93e) d1f4489b-diagnose-network C->S diagnosticsd POST /check-network-connectivity: {"ips":["192.168.86.23","10.188.128.51"]}
[2022-05-27T18:14:12.254140000Z][com.docker.diagnose][W] (5f03f93e) d1f4489b-diagnose-network C<-S 93d63d94-diagnosticsd POST /check-network-connectivity (556.286041ms): failed to ping host: exit status 1

[PASS] DD0032: do Docker networks overlap with host IPs?
[SKIP] DD0030: is the image access management authorized?
[PASS] DD0019: is the com.docker.vmnetd process responding?
[PASS] DD0033: does the host have Internet access?

Please investigate the following 2 issues:

1 : The test: is the VM networking working?
    Failed with: network checks failed: failed to ping host: exit status 1

VM seems to have a network connectivity issue. Please check your host firewall and anti-virus settings in case they are blocking the VM.

2 : The test: are the binary symlinks installed?
    Failed with: looking for /usr/local/bin/kubectl: lstat /usr/local/bin/kubectl: no such file or directory

The symlinks to the docker CLI etc are needed for docker commands to work.

Steps to reproduce the behavior

  1. Install kubectl with homebrew install kubernetes-cli
  2. Install docker desktop
  3. Inspect that soft links to kubectl for docker now exist in /usr/local/bin, and that $(which kubectl) points to that instead of the homebew installed client

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