This repository was archived by the owner on Nov 27, 2023. It is now read-only.
Allow compose exec to accept a specific instance in kube backend#2076
Merged
aiordache merged 1 commit intodocker-archive:mainfrom Sep 28, 2021
Merged
Conversation
This resolves docker-archive#1920 Signed-off-by: Michael Irwin <mikesir87@gmail.com>
aiordache
approved these changes
Sep 28, 2021
Contributor
aiordache
left a comment
There was a problem hiding this comment.
Thank you! Sorry for the delay 😅
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
This PR provides the ability to perform a
docker compose exec <pod-name|service-name>in the kube context and serves as an implementation of #1920. It looks at the requested name to see if it matches a pod name and exec's to it if a match is found. Otherwise, it falls back to the current implementation where it finds a matching pod by service.The big reason to do this is to allow teams to stay within the compose tooling and exec into specific instances. In a normal Docker context, a user can simply use
docker exec. But, that doesn't work in a kube context. They can look at logs to potentially find a problem, but have to switch to another tool to exec to the specific instance they want. And having to switch tokubectland making sure you're in the right context/namespace... would be nice to just make it easier. 😄Outstanding questions
docker compose ps?Related issue
Issue #1920