Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: add 'tilt alpha shell' for creating a shell into a container #6286

Merged
merged 1 commit into from Dec 15, 2023

Conversation

nicks
Copy link
Member

@nicks nicks commented Dec 14, 2023

designed to interoperate with the new kubectl shell, but fallback to kubectl exec if the container supports it.

Future work:

  • use with Docker Compose
  • add a terminal to the tilt UI

@nicks
Copy link
Member Author

nicks commented Dec 14, 2023

cc @joe0BAB - in particular, how this interacts with 'kubectl shell'

Copy link
Member

@nicksieger nicksieger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

- kubectl shell
- dld shell
- docker exec -it <container> bash
- docker exec -it <container> sh`,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should there be a fallback to kubectl debug also?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think kubectl debug is for a different use-case? i.e., it's more for "i'm debugging the infra and want to ssh to the Node where this pod lives and check the firewall rules" rather than tilt's "i'm debugging the container and want to poke around on its filesystem"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's interesting you thought that. You can attach to a node, but you can do the same with a pod. It's currently a bit short of functionality of enabling what 'kubectl shell' does on the client side, there is an open PR to add a privileged profile.

designed to interoperate with the new `kubectl shell`, but
fallback to kubectl exec if the container supports it.

Future work:
- use with Docker Compose
- add a terminal to the tilt UI

Signed-off-by: Nick Santos <nick.santos@docker.com>
@nicks nicks changed the title cli: add 'tilt shell' for creating a shell into a container cli: add 'tilt alpha shell' for creating a shell into a container Dec 15, 2023
@nicks
Copy link
Member Author

nicks commented Dec 15, 2023

i put this under tilt alpha shell for now, there's still some ways that the underlying tooling is evolving

@nicks nicks merged commit 30a6ff3 into tilt-dev:master Dec 15, 2023
9 checks passed
@nicks nicks deleted the nicks/shell branch December 15, 2023 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants