roadmap icon indicating copy to clipboard operation
roadmap copied to clipboard

Feature Request: configurable install of kubectl.docker

Open twodarek opened this issue 7 years ago • 12 comments

FEATURE REQUEST

First of all, thank you for the awesome product. Docker for Mac makes my daily job a lot easier. 😄

Please add the ability to disable to automatic installation of the kubectl.docker binary on start, as it breaks the ability to do ku-<TAB>get... in the terminal. Not having it tab complete with the trailing space is really breaking my muscle memory and causing endless strings of Command kubectlget does not exist.

WORKAROUND: I added a cronjob * * * * * rm /usr/local/bin/kubectl.docker > /dev/null 2>&1

  • [ X ] I have tried with the latest version of my channel (Stable)
  • [ X ] I have uploaded Diagnostics
  • Diagnostics ID: 02102F4F-3740-4328-B7A7-518EBAC6FA3B/20181129072350

Expected behavior

I, as a user of Docker for Mac, can disable the automatic installation of kubectl.docker and be able to type ku followed by <TAB>, then type my kubectl command.

Actual behavior

I, as a user of Docker for Mac, can not disable the automatic installation of kubectl.docker and it is messing up my tab complete for kubectl (ie: kubectlget results because kubectl.docker causes tab complete to stop without the space).

Information

  • Is it reproducible? Yes, every Docker for Mac start
  • Is the problem new? Yes, appeared after I updated to the most recent version of Docker for Mac
  • Did the problem appear with an update? Yes, see above
  • A reproducible case if this is a bug, Dockerfiles FTW.
  • macOS Version: 10.13.6
  • Docker Desktop version: Version 2.0.0.0-mac78 (28905)
  • Channel: stable
  • Hash: c404a62c3f

Diagnostic logs

Diagnose succeded Docker for Mac: Version 2.0.0.0-mac78 (28905)

Steps to reproduce the behavior

  1. Update to the latest version of Docker for Mac
  2. Start Docker for Mac
  3. Notice that /usr/local/bin/kubectl.docker exists and breaks tab complete for kubectl.

twodarek avatar Nov 29 '18 07:11 twodarek

AMEN!

tonglil avatar Dec 20 '18 01:12 tonglil

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale comment. Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale

docker-robott avatar Mar 20 '19 02:03 docker-robott

/remove-lifecycle stale

tonglil avatar Mar 20 '19 04:03 tonglil

/lifecycle frozen

tonglil avatar Mar 20 '19 04:03 tonglil

Please make this happen!

It sounds minor but if you are using kubectl all day like me, it's really annoying! Currently on my Mac I run rm -f $(which kubectl.docker) to fix it but this is silly.

I just opened an identical issue (in the wrong repo though): https://github.com/moby/moby/issues/38975

It would be great if this behaviour was configurable.

max-rocket-internet avatar Apr 01 '19 07:04 max-rocket-internet

Ping.

My usual process is to try to type a kubectl command eg ku<tab>get pods, say "WTF!", break my flow, type rm -f $(which kubectl.docker), type ku<tab>, verify that i now have the expected whitespace, type the rest of the kubectl command, and then try to get back into the flow again.

I don't even enable the Kubernetes feature.

Over the years this has added up to enough wasted time and breaks in flow that I would like to see this feature actively pursued now.

It's like occasionally, and lightly, stubbing your toe on a useful piece of hard-to-move furniture. Eventually you're just going to have to move it (or get someone else who knows what they are doing to move it) :smile:

GKTheOne avatar Jan 14 '21 23:01 GKTheOne

You can delete Docker's copy of kubectl:

rm -f /Applications/Docker.app/Contents/Resources/bin/kubectl

Then when Docker is restarted kubectl.docker doesn't come back. Still I think the file will be restored ever time Docker is updated.

max-rocket-internet avatar Jan 15 '21 11:01 max-rocket-internet

This issue isn't new, https://github.com/docker/for-mac/issues/2890. Homebrew on Apple silicon lives in /opt/homebrew. Would be nice if kubectl is never installed until "Enable Kubernetes" is checked in Docker Desktop preferences.

ntersol-tom avatar Aug 25 '22 21:08 ntersol-tom

This is so annoying. I remove /Applications/Docker.app/Contents/Resources/bin/kubectl. Every time Docker updates, the unwanted kubectl gets resaved there. I don't want it! I have not enabled kubernetes in Docker. Why isn't there an option to prevent this unwanted application from being installed on update?

twocs avatar Dec 23 '22 02:12 twocs

I think it's better to just stop using Docker Desktop:

  1. Uninstall Docker Desktop
  2. Install colima: brew install colima
  3. Start colima: colima start
  4. Install docker CLI: brew install docker
  5. Just use docker commands like always but without Docker Desktop 🎉

max-rocket-internet avatar Dec 29 '22 08:12 max-rocket-internet

I second this, how can we get some traction on this?

Gaardsholt avatar Nov 08 '24 14:11 Gaardsholt

I agree; the user should be able to choose whether they want Kubernetes or not.

marcocondrache avatar Jan 20 '25 08:01 marcocondrache