What do you need ? For pods it's possible! If you use 0 you'll see all pods across ns and if you go to namespace, select one then display pods you'll see pods binded to this ns. `/` will be restricted to what you chose
You can just append the namespace after the resource for a namespace-constrained search. For example for pods in ArgoCD namespace you would type: ‘:pods ArgoCD’. For secrets in webapp namespace you type ‘:secrets webapp’
What do you mean exactly? Afaik that’s possible by simply selecting a namespace first and then going to the namespace scoped resources. If you want global just press 0
Sure, it’s possible, I just think it should be a top level concern. It’s pretty much the only thing I still use the web kubernetes-dashboard for these days. I jump on, type the deployment name I want to manage and then click the deployment. The reason I do it this way is often I can’t remember if I have the particular resource as a statefulset or a deployment.
The way k9s wants me to do it is to make sure I’m filtering on the correct resource, the assumption being that I know the type of resource I want to filter on ahead of time. I want something faster. Something like a fuzzy finding command palette in an IDE.
For instance, I have Mimir installed in a namespace. With the kubernetes dashboard I go to ‘all namespaces’ type ‘mimir’ and I can see every Mimir resource and I click the right one. Mimir is made by a 3rd party, and I can’t remember off the top of my head which resources are statefulsets or are deployments. If I filter on pods I have every pod in front of me, with 3 replicas on each service that’s 3x the noise, so just dealing with pods is out of the question. With k9s I have to know more ahead of time to find the right thing, with the web ui this is much quicker.
I get your point. I kinda agree with the other comment about knowing the kind ahead of time but it’s also difficult to remember what is all part of a deployment.
What you’re describing sounds a lot like an application in argocd, where ALL resources part of a particular deployment are listed.
So technically not a cli tool, but quite a good way to see what’s under the hood of a deployment
Knowing the kind ahead of time is a requirement of the k8s API as a whole. I am guessing that the web dashboard is building some sort of informer cache for the most common kinds, but I don't see how it would be showing _all_ kinds. It's likely similar to the `all` alias in kubectl.
Amazing! I upgraded and I can see that. It definitely makes it easier but it’s not quite as simple as the web dashboard - sometimes I want to search across services or Cron too and I want that all in the same window.
My proposal would be a namespaced search (global if you hit 0), and there a multiple panes you can tab through (maybe shift+tab?) that can take you between the different resource panes on the same window. Basically I’d like to invert the flow, instead of picking a resource and then filtering I’d like to filter and then pick a resource with all of them in front of me.
EDIT: also, looking at wk, it also uses replica sets as a workloads, which is a lot of noise.
You won't regret it ;)
I really suggest you have a look to the documentation they have some really interesting features like x-ray or sanitizing. You can even add some plugins!
No, it’s a bit more. Integration with fzf means fully menu driven, with immediate filtering based on type-ahead input from keyboard. ‘kcs’ alias does what kubectx does. ‘kcns’ alias does what kubens does. It has been around forever, and it is still my go to first install on new systems. ‘kexec’ gives you the ability to run a command in any pod, letting you select the pod name by menu, also with type ahead search. The fzf integration provides the magic.
$ switch current-context
Error: multiple files in KUBECONFIG are currently not supported
multiple files in KUBECONFIG are currently not supported
Well, that's a complete non-starter. :/
If you have multiple contexts in a single kubeconfig then you'd need to set up the config file for the tool: https://github.com/danielfoehrKn/kubeswitch/blob/master/docs/kubeconfig_stores.md#configure-kubeconfig-stores
Personally, I like to have a single file named after the cluster that its configured for and then have my shell just append to the `KUBECONFIG` var....although now that I'm reading the docs, I think I can just pass in a dir for it to search...
I'm a big fan of ohmyzsh and the kube plugins. It'll just display what context you're in right there in the terminal. Plus you get auto completion on not just the binary but your actual objects in k8, whatever they happened to be named.
Edit: words
I was under the impression that Lens (not openlens) is paid even for one cluster but I installed it yesterday and worked on it without paying anything. What are the differences between the 2?
I think OpenLens is a fork of Lens, but "open source" as far as a fork goes. Lens went down the paid route some while ago + it began feeling a bit bloated / sluggish once it did. Anyways, great UI and good alternative to K9s =)
So true it hurts. I never remember the labels that could filter out the resources I'm looking for so its always
k get $whatever | grep -i "$somethinggg"
Oh 100% yes. It's weird though...outside of neovim and fzf-lua, I haven't been able to build the muscle memory to use fzf instead of a pipe to grep.
But I totally agree that it outclasses grep in this scenario!
Here's the thing though. There are A LOT of tools out there better than helm for sure.....
But if you've ever been on the hiring side of things, you'll realize that it's hard enough to even find someone who actually understands helm and doesn't ask questions like what's the difference between helm and docker in k8s.
So while the technical benefits of those other tools are definitely a valid point, there's also the knowledge side of it when trying to hire that I think people fail to see (not referencing you here BTW)
I was hired for the way my brain works and not only what it contained, I never touched k8s before my current position and 3 months after I had more knowledge on it than my team, after that we recruited others with a similar profile.
So yes, I don't understand how the ceiling can be put so low that you need to recruit people that don't understand the difference between helm and docker, an answer to which I knew even without prior k8s knowledge just because I prepared for the interview.
OpenLens, with the 'old' functionality restored via the '@alebcay/openlens-node-pod-menu' extension. We use it with krew and the oidc-login plugin and it works really well for us.
Seeing so many folks using k9s makes me wonder what I'm missing here!
I feel like all of these responses are just different ways of saying kubectl.
I'll say I like FluxCD. I'll probably take flak because "It'S a GiToPs ToOl" but I see gitops as an extension of Kubernetes, so 🤷♂️
Anyone who's giving you flak for a gitopts tool without a solid reason as to why it sucks should honestly be ignored.
I have yet to find a better way to manage hundreds/thousands of apps in multiple clusters across different regions in a cloud provider other than gitopts
https://github.com/rajatjindal/kubectl-modify-secret is an awesome "secret" weapon (hehe)! Integration into k9s can be done manually: https://github.com/derailed/k9s/issues/1017
More generally, VSCode's Kubernetes extension is quite good, and a great way to visualize things at a glance.
It was just a binary build process by someone. I guess folks were worried it could be a security risk - I am at least worry of connecting unknown binaries to my cluster. So as it did not traction and community recognition I guess it just died out. But tbh k9s satisfy all (most?) our needs so here we are...
I just looked: Lens Closed its source code. So please do not expect any more updates.
So lens is not a good idea anymore. Does not matter to me but I told people they can use it if they are not familiar with the console
I really don't see any game changing benefits to lens vs. k9s, even if it was open source and all. It just makes the work more complicated and gui dashboards for nice visualizations can be build otherwise.
K9s
K9s is great but it needs global and namespace-constrained search.
What do you need ? For pods it's possible! If you use 0 you'll see all pods across ns and if you go to namespace, select one then display pods you'll see pods binded to this ns. `/` will be restricted to what you chose
You can also use label selectors with `/` For example `app=datadog` in the search box will filter all pods with that label.
You can just append the namespace after the resource for a namespace-constrained search. For example for pods in ArgoCD namespace you would type: ‘:pods ArgoCD’. For secrets in webapp namespace you type ‘:secrets webapp’
What do you mean exactly? Afaik that’s possible by simply selecting a namespace first and then going to the namespace scoped resources. If you want global just press 0
Sure, it’s possible, I just think it should be a top level concern. It’s pretty much the only thing I still use the web kubernetes-dashboard for these days. I jump on, type the deployment name I want to manage and then click the deployment. The reason I do it this way is often I can’t remember if I have the particular resource as a statefulset or a deployment. The way k9s wants me to do it is to make sure I’m filtering on the correct resource, the assumption being that I know the type of resource I want to filter on ahead of time. I want something faster. Something like a fuzzy finding command palette in an IDE. For instance, I have Mimir installed in a namespace. With the kubernetes dashboard I go to ‘all namespaces’ type ‘mimir’ and I can see every Mimir resource and I click the right one. Mimir is made by a 3rd party, and I can’t remember off the top of my head which resources are statefulsets or are deployments. If I filter on pods I have every pod in front of me, with 3 replicas on each service that’s 3x the noise, so just dealing with pods is out of the question. With k9s I have to know more ahead of time to find the right thing, with the web ui this is much quicker.
I get your point. I kinda agree with the other comment about knowing the kind ahead of time but it’s also difficult to remember what is all part of a deployment. What you’re describing sounds a lot like an application in argocd, where ALL resources part of a particular deployment are listed. So technically not a cli tool, but quite a good way to see what’s under the hood of a deployment
Knowing the kind ahead of time is a requirement of the k8s API as a whole. I am guessing that the web dashboard is building some sort of informer cache for the most common kinds, but I don't see how it would be showing _all_ kinds. It's likely similar to the `all` alias in kubectl.
Sure! I know it’s more work but it doesn’t make me want it any less 😂. If I could get that I’d drop the web UI entirely.
in recent versions ‘wk’ will get you all workloads and you can search from there.
Amazing! I upgraded and I can see that. It definitely makes it easier but it’s not quite as simple as the web dashboard - sometimes I want to search across services or Cron too and I want that all in the same window. My proposal would be a namespaced search (global if you hit 0), and there a multiple panes you can tab through (maybe shift+tab?) that can take you between the different resource panes on the same window. Basically I’d like to invert the flow, instead of picking a resource and then filtering I’d like to filter and then pick a resource with all of them in front of me. EDIT: also, looking at wk, it also uses replica sets as a workloads, which is a lot of noise.
K9s
I finally decided to try it and it's a really powerful tool !
https://youtu.be/0o5xZ7qizEY might find this useful
thanks :)
Most welcome. I love k9s
You won't regret it ;) I really suggest you have a look to the documentation they have some really interesting features like x-ray or sanitizing. You can even add some plugins!
Yeah I saw xray and 1 few other neat features like tree
K9s
k9s
k9s
K9s FTW
Fubectl [https://github.com/kubermatic/fubectl](https://github.com/kubermatic/fubectl)
Is this just a worse version of https://github.com/ahmetb/kubectl-aliases ?
No, it’s a bit more. Integration with fzf means fully menu driven, with immediate filtering based on type-ahead input from keyboard. ‘kcs’ alias does what kubectx does. ‘kcns’ alias does what kubens does. It has been around forever, and it is still my go to first install on new systems. ‘kexec’ gives you the ability to run a command in any pod, letting you select the pod name by menu, also with type ahead search. The fzf integration provides the magic.
stern
if you work with clusters that have more than one replica of literally anything, this is the right answer
11 GitHub Stars "stern"? https://github.com/rancher/stern
No, 2.8k Github stars "stern" https://github.com/stern/stern
ah thanks
That's a fork of a fork. Below is the official one now https://github.com/stern/stern
kubectx
Kubectx because I’m very lazy
alias kx = kubectx because im lazier
Dude your a legend
Kubeswitch is an excellent alternative here. Allows you to have different contexts in different terminal tabs
Kubie is also good here
+1 for kubeswitch
Ho-le-shit! This is what I’ve been needing in my life. Ty!
$ switch current-context Error: multiple files in KUBECONFIG are currently not supported multiple files in KUBECONFIG are currently not supported Well, that's a complete non-starter. :/
If you have multiple contexts in a single kubeconfig then you'd need to set up the config file for the tool: https://github.com/danielfoehrKn/kubeswitch/blob/master/docs/kubeconfig_stores.md#configure-kubeconfig-stores Personally, I like to have a single file named after the cluster that its configured for and then have my shell just append to the `KUBECONFIG` var....although now that I'm reading the docs, I think I can just pass in a dir for it to search...
I'm a big fan of ohmyzsh and the kube plugins. It'll just display what context you're in right there in the terminal. Plus you get auto completion on not just the binary but your actual objects in k8, whatever they happened to be named. Edit: words
I prefer kubie over kubectx
kube-ps1 shameless plug
That yours?
yes
Fucking ubiquitous in the field. Thank you for your work good sir! Have a well deserved upvote
thanks, appreciate it.
K9s
kubie https://github.com/sbstp/kubie
ArgoCD
Kubecolor…useful for quickly spotting information by colour.
ArgoCD - web UI is wonderful to look at
OpenLens
I was under the impression that Lens (not openlens) is paid even for one cluster but I installed it yesterday and worked on it without paying anything. What are the differences between the 2?
I think OpenLens is a fork of Lens, but "open source" as far as a fork goes. Lens went down the paid route some while ago + it began feeling a bit bloated / sluggish once it did. Anyways, great UI and good alternative to K9s =)
K9s, Argo CD
Grep
So true it hurts. I never remember the labels that could filter out the resources I'm looking for so its always k get $whatever | grep -i "$somethinggg"
fzf is even better than grep for this
Oh 100% yes. It's weird though...outside of neovim and fzf-lua, I haven't been able to build the muscle memory to use fzf instead of a pipe to grep. But I totally agree that it outclasses grep in this scenario!
‘ag’ aka the silver searcher is basically grep but much faster. fzf is also good and provides menus which can be helpful to catch input.
Lens
k9s, stern
oc, helm
OpenLens
Lens
k9s
K9s
k9s
K9s
Krew
My answer because it encapsulates so much more that I use beyond native kubectl.
the carvel suite, in particular kapp. it's a godsend for managing changes with automation.
I love their tools too ! Ytt and kapp are so much better than helm...
Here's the thing though. There are A LOT of tools out there better than helm for sure..... But if you've ever been on the hiring side of things, you'll realize that it's hard enough to even find someone who actually understands helm and doesn't ask questions like what's the difference between helm and docker in k8s. So while the technical benefits of those other tools are definitely a valid point, there's also the knowledge side of it when trying to hire that I think people fail to see (not referencing you here BTW)
I was hired for the way my brain works and not only what it contained, I never touched k8s before my current position and 3 months after I had more knowledge on it than my team, after that we recruited others with a similar profile. So yes, I don't understand how the ceiling can be put so low that you need to recruit people that don't understand the difference between helm and docker, an answer to which I knew even without prior k8s knowledge just because I prepared for the interview.
whoa this is sweet. definitely trying this out
OpenLens, with the 'old' functionality restored via the '@alebcay/openlens-node-pod-menu' extension. We use it with krew and the oidc-login plugin and it works really well for us. Seeing so many folks using k9s makes me wonder what I'm missing here!
I didn't even know this existed but I'm going to test it out tonight
I feel like all of these responses are just different ways of saying kubectl. I'll say I like FluxCD. I'll probably take flak because "It'S a GiToPs ToOl" but I see gitops as an extension of Kubernetes, so 🤷♂️
Anyone who's giving you flak for a gitopts tool without a solid reason as to why it sucks should honestly be ignored. I have yet to find a better way to manage hundreds/thousands of apps in multiple clusters across different regions in a cloud provider other than gitopts
k9s grafana + kube-state-metrics
K9s all the way.
k9s
Openlens Kompose
I like kluctl
Kubie
Aptakube
K9s
kubetail for easy multi pod log tailing
Try stern out! https://github.com/stern/stern
Thanks, it sounds like a German magazine name
K9s
K9s
+1
K8sgpt
Yeah this will make onboarding new engineers so much simpler! Ty sir
k9s, 100%. kubectx is a close second.
checkout kubeswitch as well!
Yes, kubeswitch!
k9s
https://github.com/rajatjindal/kubectl-modify-secret is an awesome "secret" weapon (hehe)! Integration into k9s can be done manually: https://github.com/derailed/k9s/issues/1017 More generally, VSCode's Kubernetes extension is quite good, and a great way to visualize things at a glance.
K9s
I just learned about the kubectl curl plugin. It made yesterday so much easier.
kubectx and kubens
Kube-ns Kube-ctx
terraform
K9s K3d
K9s
kubetail for easy multi pod log tailing
Lens
Gremlin
K9s
Headlamp
skaffold
I've been getting a lot of use out of kubens
Devtron
Komodor
unctl [https://pypi.org/project/unctl/](https://pypi.org/project/unctl/)
Well, ehm, oc
Lens
I’ve been using Lens and it’s great
Helmsman
I tried several tools, out of all, my favorite is Lens, followed by k9s when working with terminal only. Rest in peace OpenLens, you will be missed.
kubernetes_manifest -> https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/manifest
helm
Lens is great for multi-cluster. [https://k8slens.dev/](https://k8slens.dev/)
No since you need to have account to use it. Literally everyone moved to k9s since they did the change.
I also use k9s but wasn’t there openlens?
It was just a binary build process by someone. I guess folks were worried it could be a security risk - I am at least worry of connecting unknown binaries to my cluster. So as it did not traction and community recognition I guess it just died out. But tbh k9s satisfy all (most?) our needs so here we are...
I just looked: Lens Closed its source code. So please do not expect any more updates. So lens is not a good idea anymore. Does not matter to me but I told people they can use it if they are not familiar with the console
k9s is not a CLI app it's a GUI app that runs in your terminal. You don't need console familiarity to use it.
You are completely correct and as I said I use it myself. Still gui people don’t like k9s initially
Sorry to nitpick, but it's actually a [TUI](https://en.wikipedia.org/wiki/Text-based_user_interface) (Text-based User Interface), not a GUI
Well to nitpick further, a TUI is just a subset of a GUI that uses text artifacts in a grid layout to build up the graphical interface :P
I really don't see any game changing benefits to lens vs. k9s, even if it was open source and all. It just makes the work more complicated and gui dashboards for nice visualizations can be build otherwise.
But there is open alternative, openlens
I love lens, I use it every day. You can make a free account and a gui is often much faster and easier to parse than a cli.
Same here, use it everyday and Flux for GitOps.
Same here