derailed / k9s

🐶 Kubernetes CLI To Manage Your Clusters In Style!
https://k9scli.io
Apache License 2.0
26.97k stars 1.69k forks source link

See log of kubectl commands or rest requests to help leark k8s, automate #1285

Open avgojzack opened 3 years ago

avgojzack commented 3 years ago




Describe the solution you'd like It would be nice if there was a way to see a history of the things I've done, nice for auditing "Wait, what namespace did I just do that in!?" and for leaning. Doesn't have to be super nice, but it would be cool to go to :history or something.

Additional context Helps frame k9s as a learning tool, and helps address the main criticism I've heard (dependence on k9s leads to a lack of understanding the underlying commands, which you need sometimes for automation)

IvanBodnya commented 2 years ago

I'm new to this project, but I had a quick look at whether such feature can be easily achieved. We use this package https://github.com/kubernetes/client-go to interact with k8s cluster. So, for example to list all pods, we call a method from "client-go" package and pass along some information e.g. namespace with it. For now, I haven't seen and easy way to get exact commands that were issues against k8s cluster. "Client-go" package internally makes Rest API calls to k8s itself.

theo123490 commented 2 years ago

is this being done? I just deleted a deployment and not pods by accident, and I have no Idea or proof of which one I did, a history or log file will help a lot