kubectl get pods

built-in
0.0% Savings
0 Commands
0 Tokens saved
2 Tests

Install

tokf install 239077ce5df059caec7970d70743f7aec1a2ff42b2ee0d9ae6133f85349609d9
Safety checks passed

Filter definition

command = ["kubectl get pods", "kubectl get pod", "kubectl get po"]

[on_success]
skip = [
  "\\s+Completed\\s+",
  "\\s+Evicted\\s+",
]
head = 30

[on_failure]
tail = 10

Examples

resource not found shows error ~13 tokens → ~13 tokens
Raw output
Error from server (NotFound): pods "myapp" not found
Filtered output
Error from server (NotFound): pods "myapp" not found
skips Completed and Evicted pods ~112 tokens → ~64 tokens (43% saved)
Raw output
NAME                          READY   STATUS      RESTARTS   AGE
nginx-deployment-7fb96c846b   1/1     Running     0          2d
postgres-statefulset-0        1/1     Running     0          5d
redis-deployment-5d4c9b8d7f   1/1     Running     2          12h
migration-job-abc12           0/1     Completed   0          1d
old-pod-evicted-xyz           0/1     Evicted     0          3d
batch-job-def34               0/1     Completed   0          6h
Filtered output
NAME                          READY   STATUS      RESTARTS   AGE
nginx-deployment-7fb96c846b   1/1     Running     0          2d
postgres-statefulset-0        1/1     Running     0          5d
redis-deployment-5d4c9b8d7f   1/1     Running     2          12h
Warning: Community filters are third-party code. Review the filter definition above before installing it in production environments.
Browse all filters