kubectl/cheatsheet - add command for sorting events (#7519)
- add a command to "List Events sorted by timestamp" workaround for #29838
This commit is contained in:
committed by
k8s-ci-robot
parent
75aeaa3ddb
commit
0955d6be90
@@ -136,6 +136,9 @@ $ JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.
|
|||||||
|
|
||||||
# List all Secrets currently in use by a pod
|
# List all Secrets currently in use by a pod
|
||||||
$ kubectl get pods -o json | jq '.items[].spec.containers[].env[]?.valueFrom.secretKeyRef.name' | grep -v null | sort | uniq
|
$ kubectl get pods -o json | jq '.items[].spec.containers[].env[]?.valueFrom.secretKeyRef.name' | grep -v null | sort | uniq
|
||||||
|
|
||||||
|
# List Events sorted by timestamp
|
||||||
|
$ kubectl get events --sort-by=.metadata.creationTimestamp
|
||||||
```
|
```
|
||||||
|
|
||||||
## Updating Resources
|
## Updating Resources
|
||||||
|
|||||||
Reference in New Issue
Block a user