Feature Request: configurable install of kubectl.docker
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
- Update to the latest version of Docker for Mac
- Start Docker for Mac
- Notice that /usr/local/bin/kubectl.docker exists and breaks tab complete for kubectl.
AMEN!
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
/remove-lifecycle stale
/lifecycle frozen
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.
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:
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.
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.
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?
I think it's better to just stop using Docker Desktop:
- Uninstall Docker Desktop
- Install colima:
brew install colima - Start colima:
colima start - Install docker CLI:
brew install docker - Just use
dockercommands like always but without Docker Desktop 🎉
I second this, how can we get some traction on this?
I agree; the user should be able to choose whether they want Kubernetes or not.