docker / roadmap

Welcome to the Public Roadmap for All Things Docker! We welcome your ideas.
https://github.com/docker/roadmap/projects/1
Creative Commons Zero v1.0 Universal
1.45k stars 246 forks source link

[Docker Labs K8s Toolkit] Feature requests, discussions, feedback #590

Open joe0BAB opened 6 months ago

joe0BAB commented 6 months ago

Tell us about your request The Docker Labs K8s Toolkit extension is an experimental feature to improve debugging with Kubernetes. Get your favorite shell with all your debug tools into any pod/container. Comes with bash/fish/zsh shell, NixOS based package manager, nice prompt and more.

We are looking for feedback! Any wishes or requests welcome! Comment below or upvote existing ideas.

Which service(s) is this request for? Docker Labs K8s Toolkit extension

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? This is a placeholder to collect feedback, discussions and feature requests.

Are you currently working around the issue? N/A

Additional context To report bugs/issues go here

Related: Docker Labs Debug Tools extension

obeone commented 5 months ago

Hi, it would be nice to be able to disable telemetry... Maybe with a global configuration, but at least with an argument on call :)

Thanks, impressive tool !

marvingreenberg commented 4 months ago

I enabled zsh completion, like

$ source <(kubectl shell completion zsh)
$ kubectl get pod
NAME                             READY   STATUS    RESTARTS   AGE
crowd-5cd447c459-rxcpg           1/1     Running   0          15h
crowd-postgres-d88f576b4-4c5n5   1/1     Running   0          15h
$ kubectl shell crowd-5<tab>  -- crickets...

It would be nice to have zsh completion complete the pod names. The completions for kubectl do, like kubectl get pod/crowd-5<tab>

g0t4 commented 1 month ago

fish shell completion of pods/namespaces would be awesome, like docker debug <TAB> does

kubectl-shell --namespace <TAB> # complete namespace
kubectl-shell <TAB> # complete pod names (in current namespace, based on -n/--namespace too)

For now, pod names matter more for me so I deleted the ~/.config/fish/completions/kubectl-shell.fish and am using this instead:

# workaround for now, only completes pods in current namespace (won't factor in --namespace to kubectl-shell) so you have to change to the desired namespace
complete -c kubectl-shell -a '(kubectl get pod -o custom-columns=:metadata.name)' --no-files

Also, I vote to get rid of completing trivial subcommands (i.e. help,version,completion) because they conflict with completing pod names which are the only thing people will complete 99% of the time... for example, why would we ever need to complete the completion subcommand! In the future, if there are meaningful subcommands, then they can be completed too...

g0t4 commented 1 month ago

@marvingreenberg IIAC you didn't get any completions to work with kubectl shell for subcommands and/or flags? IIUC only kubectl-shell will complete (which is perfectly fine IMO)

joe0BAB commented 1 month ago

Unfortunately I believe @g0t4 is correct. As far as I'm aware there (still) are technically limitations to add tab completion to kubectl plugins :/

g0t4 commented 1 month ago

FTR, I am 100% fine with using kubectl-shell (instead of kubectl shell)... probably a good thing just to avoid collision with completions for kubectl subcommands and/or other kubectl plugins.