Quickstart
List something
kx get podsPods · diagnostics · 14 items X NAME READY STATUS RESTARTS AGE 1 api-badimage-b97d844fd-s75rr 0/1 ImagePullBackOff 0 28d 2 billing-flaky-b7878b475-dm9sk 1/1 Running 15 (13h ago) 28d 3 cache-oom-cc849dbdb-2qdkw 0/1 CrashLoopBackOff 2524 (98s ago) 28d 4 frontend-notready-7fc649587b-r4fh4 0/1 Running 4 (13h ago) 28d 5 frontend-notready-7fc649587b-zvtb5 0/1 Running 4 (13h ago) 28d 6 memory-pressure 1/1 Running 2 (13h ago) 22d 7 migration-backofflimit-qwhdn 0/1 Error 0 22d
Pods · diagnostics · 14 items X NAME READY STATUS RESTARTS AGE 1 api-badimage-b97d844fd-s75rr 0/1 ImagePullBackOff 0 28d 2 billing-flaky-b7878b475-dm9sk 1/1 Running 15 (13h ago) 28d 3 cache-oom-cc849dbdb-2qdkw 0/1 CrashLoopBackOff 2524 (99s ago) 28d 4 frontend-notready-7fc649587b-r4fh4 0/1 Running 4 (13h ago) 28d 5 frontend-notready-7fc649587b-zvtb5 0/1 Running 4 (13h ago) 28d 6 memory-pressure 1/1 Running 2 (13h ago) 22d 7 migration-backofflimit-qwhdn 0/1 Error 0 22d
Pods · diagnostics · 14 items X NAME READY STATUS RESTARTS AGE 1 api-badimage-b97d844fd-s75rr 0/1 ImagePullBackOff 0 28d 2 billing-flaky-b7878b475-dm9sk 1/1 Running 15 (13h ago) 28d 3 cache-oom-cc849dbdb-2qdkw 0/1 CrashLoopBackOff 2524 (99s ago) 28d 4 frontend-notready-7fc649587b-r4fh4 0/1 Running 4 (13h ago) 28d 5 frontend-notready-7fc649587b-zvtb5 0/1 Running 4 (13h ago) 28d 6 memory-pressure 1/1 Running 2 (13h ago) 22d 7 migration-backofflimit-qwhdn 0/1 Error 0 22d
Pods · diagnostics · 14 items X NAME READY STATUS RESTARTS AGE 1 api-badimage-b97d844fd-s75rr 0/1 ImagePullBackOff 0 28d 2 billing-flaky-b7878b475-dm9sk 1/1 Running 15 (13h ago) 28d 3 cache-oom-cc849dbdb-2qdkw 0/1 CrashLoopBackOff 2524 (99s ago) 28d 4 frontend-notready-7fc649587b-r4fh4 0/1 Running 4 (13h ago) 28d 5 frontend-notready-7fc649587b-zvtb5 0/1 Running 4 (13h ago) 28d 6 memory-pressure 1/1 Running 2 (13h ago) 22d 7 migration-backofflimit-qwhdn 0/1 Error 0 22d
Pods · diagnostics · 14 items X NAME READY STATUS RESTARTS AGE 1 api-badimage-b97d844fd-s75rr 0/1 ImagePullBackOff 0 28d 2 billing-flaky-b7878b475-dm9sk 1/1 Running 15 (13h ago) 28d 3 cache-oom-cc849dbdb-2qdkw 0/1 CrashLoopBackOff 2524 (99s ago) 28d 4 frontend-notready-7fc649587b-r4fh4 0/1 Running 4 (13h ago) 28d 5 frontend-notready-7fc649587b-zvtb5 0/1 Running 4 (13h ago) 28d 6 memory-pressure 1/1 Running 2 (13h ago) 22d 7 migration-backofflimit-qwhdn 0/1 Error 0 22d
Pods · diagnostics · 14 items X NAME READY STATUS RESTARTS AGE 1 api-badimage-b97d844fd-s75rr 0/1 ImagePullBackOff 0 28d 2 billing-flaky-b7878b475-dm9sk 1/1 Running 15 (13h ago) 28d 3 cache-oom-cc849dbdb-2qdkw 0/1 CrashLoopBackOff 2524 (99s ago) 28d 4 frontend-notready-7fc649587b-r4fh4 0/1 Running 4 (13h ago) 28d 5 frontend-notready-7fc649587b-zvtb5 0/1 Running 4 (13h ago) 28d 6 memory-pressure 1/1 Running 2 (13h ago) 22d 7 migration-backofflimit-qwhdn 0/1 Error 0 22d
Pods · diagnostics · 14 items X NAME READY STATUS RESTARTS AGE 1 api-badimage-b97d844fd-s75rr 0/1 ImagePullBackOff 0 28d 2 billing-flaky-b7878b475-dm9sk 1/1 Running 15 (13h ago) 28d 3 cache-oom-cc849dbdb-2qdkw 0/1 CrashLoopBackOff 2524 (99s ago) 28d 4 frontend-notready-7fc649587b-r4fh4 0/1 Running 4 (13h ago) 28d 5 frontend-notready-7fc649587b-zvtb5 0/1 Running 4 (13h ago) 28d 6 memory-pressure 1/1 Running 2 (13h ago) 22d 7 migration-backofflimit-qwhdn 0/1 Error 0 22d
Pods · diagnostics · 14 items X NAME READY STATUS RESTARTS AGE 1 api-badimage-b97d844fd-s75rr 0/1 ImagePullBackOff 0 28d 2 billing-flaky-b7878b475-dm9sk 1/1 Running 15 (13h ago) 28d 3 cache-oom-cc849dbdb-2qdkw 0/1 CrashLoopBackOff 2524 (99s ago) 28d 4 frontend-notready-7fc649587b-r4fh4 0/1 Running 4 (13h ago) 28d 5 frontend-notready-7fc649587b-zvtb5 0/1 Running 4 (13h ago) 28d 6 memory-pressure 1/1 Running 2 (13h ago) 22d 7 migration-backofflimit-qwhdn 0/1 Error 0 22d
Pods · diagnostics · 14 items X NAME READY STATUS RESTARTS AGE 1 api-badimage-b97d844fd-s75rr 0/1 ImagePullBackOff 0 28d 2 billing-flaky-b7878b475-dm9sk 1/1 Running 15 (13h ago) 28d 3 cache-oom-cc849dbdb-2qdkw 0/1 CrashLoopBackOff 2524 (99s ago) 28d 4 frontend-notready-7fc649587b-r4fh4 0/1 Running 4 (13h ago) 28d 5 frontend-notready-7fc649587b-zvtb5 0/1 Running 4 (13h ago) 28d 6 memory-pressure 1/1 Running 2 (13h ago) 22d 7 migration-backofflimit-qwhdn 0/1 Error 0 22d
Pods · diagnostics · 14 items X NAME READY STATUS RESTARTS AGE 1 api-badimage-b97d844fd-s75rr 0/1 ImagePullBackOff 0 28d 2 billing-flaky-b7878b475-dm9sk 1/1 Running 15 (13h ago) 28d 3 cache-oom-cc849dbdb-2qdkw 0/1 CrashLoopBackOff 2524 (99s ago) 28d 4 frontend-notready-7fc649587b-r4fh4 0/1 Running 4 (13h ago) 28d 5 frontend-notready-7fc649587b-zvtb5 0/1 Running 4 (13h ago) 28d 6 memory-pressure 1/1 Running 2 (13h ago) 22d 7 migration-backofflimit-qwhdn 0/1 Error 0 22d
That is kubectl’s own table with a column in front of it. The numbers are the whole idea: they are what every other command takes.
Use the numbers
kx describe 3
kx logs 2 -f --tail=100
kx yaml 1
kx exec 2The index is resolved against the listing you just ran, so 3 means the third row of it — cache-oom-cc849dbdb-2qdkw above — until you list something else.
Several at once, and ranges:
kx describe 1 3 5 # three resources
kx delete 3..5 # a range
kx delete ..3 # from the start
kx delete 5.. # to the end of the listingDrop the get
Known kinds can be spelled directly, kubectl’s shorthands included:
kx pods
kx deploy -n kube-system
kx svc -m apiAn integer after a kind relists just that row — kx po 3.
Anything kx doesn’t recognize as a kind falls back to kx get <resource>, so a CRD you have installed works the same way.
Narrow the listing
The --match/-m flag filters rows by name substring, and any flag kx doesn’t recognize goes through to kubectl untouched:
kx pods -m api
kx pods -n prod -l app=web
kx pods -AA listing made with -A is indexed like everything else: each row remembers the namespace it came from, so kx logs 7 reaches into a namespace you aren’t in.
See where you are
kx stateThat prints the listing your indexes currently resolve against, and the namespace and context it was read in. Recent listings are kept as a history, ten by default — see state and history for moving between them.
Where next
- Indexes and selection — everything the numbers can do
- State and history — what an index resolves against, and when it stops
- Configuration —
~/.kx/config.tomland the environment overrides - Themes — including the one this page is drawn in