Skip to content

kubectl overrides /usr/local/bin/kubectl when Kubernetes is enabled #2890

@xueshanf

Description

@xueshanf
  • [x ] I have tried with the latest version of my channel (Stable or Edge)
  • I have submitted Diagnostics
  • I have included the Diagnostics ID in this Issue
  • macOS Version: 10.12.6

Expected behavior

should not override existing /usr/local/bin/kubectl installation

Actual behavior

/usr/local/bin/kubectl is replaced with docker's installation. The existing one is renamed to kubectl.backup.

Steps to reproduce the behavior

  1. brew install kubectl
$ ls -l /usr/local/bin/kubectl /usr/local/bin/kubectl -> ../Cellar/kubernetes-cli/1.10.1/bin/kubectl
  1. Install docker-for-mac edge, enable kuberneters
$ ls -l /usr/local/bin/kubectl /usr/local/bin/kubectl -> /Applications/Docker.app/Contents/Resources/bin /usr/local/bin/kubectl.backup -> ../Cellar/kubernetes-cli/1.10.1/bin/kubectl

The version installed by Docker-for-Mac is v1.9.x, it doesn't work with some features that requires v1.10.x, such as AWS authentication with heptio-aws-auth plugin.

Maybe Docker-for-Mac installer should test existing /usr/local/bin/kubectl and not try to replace it, or at least gives users an option to override or not?

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