derailed / k9s Goto Github PK
View Code? Open in Web Editor NEW๐ถ Kubernetes CLI To Manage Your Clusters In Style!
Home Page: https://k9scli.io
License: Apache License 2.0
๐ถ Kubernetes CLI To Manage Your Clusters In Style!
Home Page: https://k9scli.io
License: Apache License 2.0
Version: 0.1.3
Platform: RHEL 7.6 (AWS)
I see this has come up before (#40) and that you had said that it is now necessary to type the > character first. However I still don't seem to be able to get that to work. So that I'm not missing something. Lets say I am looking at services accounts and I want to switch to pods, do I type ...
>po<return>
i.e. the character '>' followed by 'po' then the RETURN key.
That doesn't work for me.
Pressing ? and selecting using the arrow keys does, but ...
What am I missing ?
please remove the shortcut key from the backspace key, control + d was better.
We like to restrict network access to the kube API, so we have k9s installed on a management server. Unfortunately, due to the location of the log file (/tmp/k9s.log), k9s will only work for the first person who runs it. Subsequent users will receive a permission denied error like this:
$ k9s
panic: open /tmp/k9s.log: permission denied
goroutine 1 [running]:
main.init.0()
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/main.go:15 +0xcc
Perhaps the log file should be user-specific? If so, it could either live in the user's home directory (~/.k96/logs ?) or in /tmp/k9s-username.log
Or maybe use syslog instead.
The alias dashboard doesnt support filtering and requires the need to scroll through each entry to find the right resource. This gets harder when you have multiple CRDs and APIGroups (ex. istio).
Would be great to have the /
option in every dashboard for that matter.
Hi !
I would like to propose an enhancement, unless this is already implemented ๐.
When browsing pods, I would like to be able to hit and expand the containers within that pod.
For example:
Namespace | Name | Read.... |
---|---|---|
foo | bar | 2/2 |
-> container_A | ||
-> container_B |
what do you think ?
If you like this idea i might be able to help !
Most of the time I al looking for a specific resource, and since we name ours in such a way, that when using kubectl
, I can just grep for the resources I need. For instance kubectl get all -n my-namespace | grep my-app
. It would be awesome to be able to filter, and keep that filter as you bounce between resource type views.
Running k9s
I just get
$k9s
panic: (*logrus.Entry) (0x1e88f20,0xc000210cc0)
goroutine 1 [running]:
github.com/derailed/k9s/vendor/github.com/sirupsen/logrus.Entry.log(0xc0000d0480, 0xc000515cb0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/csanchez/dev/golang/src/github.com/derailed/k9s/vendor/github.com/sirupsen/logrus/entry.go:216 +0x2cf
github.com/derailed/k9s/vendor/github.com/sirupsen/logrus.(*Entry).Panic(0xc000210c60, 0xc000579c88, 0x1, 0x1)
/Users/csanchez/dev/golang/src/github.com/derailed/k9s/vendor/github.com/sirupsen/logrus/entry.go:290 +0xab
github.com/derailed/k9s/vendor/github.com/sirupsen/logrus.(*Logger).Panic(0xc0000d0480, 0xc000579c88, 0x1, 0x1)
/Users/csanchez/dev/golang/src/github.com/derailed/k9s/vendor/github.com/sirupsen/logrus/logger.go:271 +0x6d
github.com/derailed/k9s/vendor/github.com/sirupsen/logrus.Panic(0xc000579c88, 0x1, 0x1)
/Users/csanchez/dev/golang/src/github.com/derailed/k9s/vendor/github.com/sirupsen/logrus/exported.go:123 +0x4b
github.com/derailed/k9s/views.(*appView).Run(0xc0001186e0)
/Users/csanchez/dev/golang/src/github.com/derailed/k9s/views/app.go:108 +0xad
github.com/derailed/k9s/cmd.run(0x2aa0840, 0x2ac8a48, 0x0, 0x0)
/Users/csanchez/dev/golang/src/github.com/derailed/k9s/cmd/root.go:70 +0xa6
github.com/derailed/k9s/vendor/github.com/spf13/cobra.(*Command).execute(0x2aa0840, 0xc0000b8170, 0x0, 0x0, 0x2aa0840, 0xc0000b8170)
/Users/csanchez/dev/golang/src/github.com/derailed/k9s/vendor/github.com/spf13/cobra/command.go:766 +0x2cc
github.com/derailed/k9s/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x2aa0840, 0xc0000ce760, 0x209, 0xc00016df88)
/Users/csanchez/dev/golang/src/github.com/derailed/k9s/vendor/github.com/spf13/cobra/command.go:852 +0x2fd
github.com/derailed/k9s/vendor/github.com/spf13/cobra.(*Command).Execute(0x2aa0840, 0x1eb66c9, 0x4)
/Users/csanchez/dev/golang/src/github.com/derailed/k9s/vendor/github.com/spf13/cobra/command.go:800 +0x2b
github.com/derailed/k9s/cmd.Execute()
/Users/csanchez/dev/golang/src/github.com/derailed/k9s/cmd/root.go:59 +0x2d
main.main()
/Users/csanchez/dev/golang/src/github.com/derailed/k9s/main.go:21 +0x20
digging a bit the actual error is terminal entry not found
I'm using iterm2 and based on some internet search I managed to make it work with TERM=xterm-256color k9s
Many times when viewing resources, issues with one are underlined by issues in another one. I constantly find myself using kubectl get all
first and then drilling down. It would be nice to have that here.
When I open the logs of a pod, there is no way to scroll up or down. Is this intended? If so, I think it would be a nice feature to add the ability to scroll during log tail like you normally would.
Would it be possible to change hotkeys like CTRL-E
to simply e
? It would be easier to type.
CTRL-B
in particular is problematic if you use tmux, since that's the default tmux prefix. It would be awesome if instead of CTRL-B
you could just type q
or ESC
to go back a screen (rather than exit the whole app).
FYI htop
has nicely designed hotkeys.
Newly created resources show up in red until they are fully up, is there any way to change this color to indicate it's new resource (yellow maybe)? This would help differentiate new things from other broken things in the cluster.
Due to a setup that k9s is unhappy with (kubeconfig outside of normal location) k9s quits upon start which is expected the only issue is no error or warning is printed back to console.
My proposal would be to stick to vi-style key mappings for navigation and modification. For example for basic up/down movement CTRL-F/B and CTRL-D/U. WDYT?
ctrl-space goes to viewing all namespaces
... isn't it supposed to go to a tools
option ?
also, ?
or h
is not doing anything.
built from master
on OSx
Version: 0.1.2
Platform: RHEL 7.6 (AWS)
Error on start ...
[ec2-user@ip-xx-xx-xxx-xxx~]$ k9s
/usr/local/bin/k9s: line 5: syntax error near unexpected token ]' /usr/local/bin/k9s: line 5:
} ]'
podView.sshInto
calls "sh"
directly.
Generally, I prefer /bin/bash
since it supports tab auto-completion.
Should be simple to change, but I'm not sure the best way to store the configuration preference. Maybe this issue is really to store configuration.
I would love to see a quick scale feature, where you can scale a deployment without having to edit the deployment. Like kubectl scale --replicas x service-name
.
Just a couple features like this, and k9s could replace kubectl for me.
Upon deleting a pod the row selector moves to the top of the table which is column names. That is a pain when we have to delete multiple pods.
Can we also support deleting multiple and all pods in a namespace. Pretty useful when you want to just restart everything one is working on. Should translate to something kubectl -n some_namespace delete pod --all
and kubectl -n some_namespace delete pod some_pod_1 some_pod_2
.
This in general can be mapped to any k8s resource rather than just pods.
It seems that macOS is only supported based on the Makefile so far.
Are you planning to support Linux as well? :)
Also it'd be nice if you have supported environment with go version and necessary libraries if there's any.
When trying to switch to an already active context (the one with the trailing star) the application crashes. Most probably because it advices the K8s API to use the star as part of the context name:
panic: invalid configuration: [context was not found for specified context: ambid-stg-app-admin*, cluster has no server defined] [recovered]
panic: invalid configuration: [context was not found for specified context: ambid-stg-app-admin*, cluster has no server defined]
goroutine 1 [running]:
github.com/k8sland/tview.(*Application).Run.func1(0xc00013dd60)
/Users/fernand/go_wk/derailed/pkg/mod/github.com/k8sland/[email protected]/application.go:167 +0x8b
panic(0x1d88c00, 0xc00053e940)
/usr/local/Cellar/go/1.11.5/libexec/src/runtime/panic.go:513 +0x1b9
github.com/derailed/k9s/resource/k8s.(*apiServer).restConfigOrDie(0xc00020ef60, 0x1085aa9)
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/resource/k8s/api.go:207 +0x7e
github.com/derailed/k9s/resource/k8s.(*apiServer).dialOrDie(0xc00020ef60, 0x1085845, 0x0)
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/resource/k8s/api.go:96 +0x49
github.com/derailed/k9s/resource/k8s.(*apiServer).supportsMxServer(0xc00020ef60, 0xc0000da720)
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/resource/k8s/api.go:238 +0x43
Probably it's my particular keyboard, but D and E are so close that sometimes I hit D instead of E when editing a deployment... and there it goes!
Would it be possible to ask for user confirmation before deleting a resource? (could be a config toggle)
Hey :)
thanks for your tool! - Love it.
Can I pr to change the key binding of deletion of a pod? - Maybe to CTRL + 'backspace'?
I just search with '/' for pods and then wanted to change the search and immediately pressed 'backspace' which resulted in deletion of the pod. This was unexpected.
Greetings, Thomas
It would be awesome if it would be possible to describe a kubernetes object within k9s.
K9s 0.1.1 is not allowing selection of namespaces outside of all
, default
and kube-system
which was possible in 0.1.0.
First noticed on a GKE cluster running 1.12.4-gke.6, reproduced on a local minikube instance.
Reproduce
Have minikube
, kubectl
and k9s
installed.
$ minikube delete
$ minikube start
$ kubectl apply -f https://k8s.io/examples/admin/namespace-dev.json
Running
$ kubectl get namespaces
Returns
NAME STATUS AGE
default Active xxx
development Active xxx
kube-public Active xxx
kube-system Active xxx
Launching k9s you can only see
<0> all
<1> default
<2> kube-system
Hi,
Have you any plans to support openshift, i.e. "oc" as opposed to kubectl commands?
When running against an aks-engine cluster with azure auth integration results in:
panic: No Auth Provider found for name "azure"
It would be really slick if k9s
could interpret ANSI escape sequences and show colors, I find colors make logs easier to read.
I run kubernetes with rancher on a local datacenter. I use metalLB for loadbalancing
kubectl shows the ip address of a service managed by metallb,
kubectl get services --all-namespaces
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)
foo foo LoadBalancer 10.251.79.248 10.47.92.5 6543:32169/TCP
bar bar LoadBalancer 10.252.8.197 10.47.92.3 3000:31726/TCP
Yet in k9s, it shows the external ip as pending
โ NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE โ
โ foo foo LoadBalancer 10.251.79.248 <pending> 6543โบ32169 19h โ
โ bar bar LoadBalancer 10.252.8.197 <pending> 3000โบ31726 25h
i hope someone implements ability to view / manage RBAC kubernetes kind like a ClusterRole, ClusterRolebinding, Role, RoleBinding
some design principles describe here
https://github.com/kubernetes/dashboard/blob/master/docs/design/access-control.md
and here
https://docs.docker.com/ee/ucp/admin/configure/configure-rbac-kube/
I would like to be able to update to the latest version by just doing:
go get -u github.com/derailed/k9s
If I do so today, I get the following errors (ubuntu 18.04 LTS, go version go1.11.5 linux/amd64):
$ go get -u github.com/derailed/k9s
# github.com/derailed/k9s/vendor/cloud.google.com/go/compute/metadata
workspace/go/src/github.com/derailed/k9s/vendor/cloud.google.com/go/compute/metadata/metadata.go:453:21: undefined: resource
# github.com/derailed/k9s/vendor/github.com/googleapis/gnostic/OpenAPIv2
workspace/go/src/github.com/derailed/k9s/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go:872:28: undefined: resource
workspace/go/src/github.com/derailed/k9s/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go:907:37: undefined: resource
workspace/go/src/github.com/derailed/k9s/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go:910:53: undefined: resource
workspace/go/src/github.com/derailed/k9s/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go:1012:67: undefined: resource
workspace/go/src/github.com/derailed/k9s/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go:1119:38: undefined: resource
workspace/go/src/github.com/derailed/k9s/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go:1122:54: undefined: resource
workspace/go/src/github.com/derailed/k9s/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go:1342:48: undefined: resource
workspace/go/src/github.com/derailed/k9s/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go:1398:37: undefined: resource
workspace/go/src/github.com/derailed/k9s/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go:1401:53: undefined: resource
workspace/go/src/github.com/derailed/k9s/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go:1624:48: undefined: resource
workspace/go/src/github.com/derailed/k9s/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go:1624:48: too many errors
# github.com/derailed/k9s/vendor/k8s.io/apimachinery/pkg/apis/meta/v1
workspace/go/src/github.com/derailed/k9s/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go:277:29: undefined: resource
Thank you for your awesome work!
Would be very nice to be able to sort the listing based on arbitrary columns - maybe by selecting the header row, [left]/[right] to select column, and [enter] to sort ascending or descending.
Similarly, perhaps one could select a column then hit [/] and get a little prompt for a regex to filter the column against.
Great project!
i do not have the exception anymore but k9s crashed when i filtered on HPA types (Horizontal Pod Autoscaler).
I have removed my hpa but still thought i d report it.
good job on k9s, it makes things easier :)
Having the ability to limit the application to specific namespaces - perhaps via a ~/.k9s/config file - would be great.
Would be nice to support last container exited logs, usually available through kubectl logs <pod_name> -p
I work with a cluster that uses RBAC to limit non-administrative users to specific namespaces and as such I don't have permission to list all of the available namespaces. I was hoping that the -n option might allow me to use k9s but even with this option I'm getting the following error on start:
> ./k9s -n my-namespace
panic: namespaces is forbidden: User "[email protected]" cannot list resource "namespaces" in API group "" at the cluster scope
goroutine 1 [running]:
github.com/derailed/k9s/views.mustK8s()
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/views/app.go:119 +0xc2
github.com/derailed/k9s/views.(*appView).Init(0xc0000ffd40, 0x1407c74, 0x5, 0x2, 0x7fffbfcb96f7, 0x6)
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/views/app.go:74 +0xb0
github.com/derailed/k9s/cmd.run(0x1dfb940, 0xc00017b200, 0x0, 0x2)
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/cmd/root.go:109 +0xfd
github.com/spf13/cobra.(*Command).execute(0x1dfb940, 0xc0000380a0, 0x2, 0x2, 0x1dfb940, 0xc0000380a0)
/Users/fernand/go_wk/derailed/pkg/mod/github.com/spf13/[email protected]/command.go:766 +0x2cc
github.com/spf13/cobra.(*Command).ExecuteC(0x1dfb940, 0xc00000c788, 0xc0000b3f78, 0xc0000b3f88)
/Users/fernand/go_wk/derailed/pkg/mod/github.com/spf13/[email protected]/command.go:852 +0x2fd
github.com/spf13/cobra.(*Command).Execute(0x1dfb940, 0xc0000001a4, 0xc00000c788)
/Users/fernand/go_wk/derailed/pkg/mod/github.com/spf13/[email protected]/command.go:800 +0x2b
github.com/derailed/k9s/cmd.Execute()
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/cmd/root.go:91 +0x2d
main.main()
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/main.go:22 +0x20
Firstly, thanks for creating k9s. Although I have had a few issues whilst playing with it, I am very thankful for what you've created.
Steps to reproduce:
Note: you need more than 1 context available (2 different clusters) in your list of contexts. For example serverA/foo & serverB/bar
kubectl
to set your current context, eg: kubectl config serverA/foo
k9s
with the --context
flag pointing to the other context, eg: k9s --context serverB/bar
k9s
It would be create to have a Trigger keybinding for cronjobs, much like the Kubernetes Dashboard has.
Also: thanks for this, this is a great tool. We'd love to help with building this out.
Aliases to switch between resources do not work, i.e. when I type cm or dp or hpa nothing happens although they work over menu Ctrl+A
Terminal Emulator iTerm2 Build 3.2.7
MacOS Mojave 10.14.2
This is probably not a k9s
specific issue, but I'm not sure how to fork the code on GitHub.
With packages using Gopkg.toml
, I could set up a specific source
to use my local code without editing all the imports. But I'm not sure how to do with with Go modules.
Thanks!
It looks like the log viewer currently only shows logs for the default container--it would be awesome if you could switch to see logs from init containers.
To manage different clusters simultaneously please add support for --context
and --kubeconfig
parameters (kubectl inspired)
Hey there!
k9s was crashing on startup, and checking the log at /tmp/k9s.log it says:
time="2019-02-04T11:23:50Z" level=fatal msg="No Auth Provider found for name \"oidc\""
Probably because k9s doesn't support the oidc auth method perhaps?
I would envision similar to how to access a kube resource like po
, you could also filter by namespace: /ns foo
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.