Kubernetes Operations: Difference between revisions
Jump to navigation
Jump to search
Line 18: | Line 18: | ||
=To Redistribute= | =To Redistribute= | ||
==Kill Immediately== | ==Kill Immediately== |
Revision as of 17:26, 22 August 2019
Internal
Subjects
Runtimes
To Redistribute
Kill Immediately
kubectl delete -n my-ns pod my-pod --force --grace-period=0
Logging
"Tail" logging:
kubectl -n my-namespace logs -f my-pod
Logging that survives pod restart:
while ! kubectl -n my-namespace logs -f my-pod; do sleep 1; done
Port Fowarding
while ! kubectl -n my-namespace port-forward service/my-service 8787:8787; do sleep 1; done
Get an Individual Attribute Only
https://gist.github.com/so0k/42313dbb3b547a0f51a547bb968696ba
kubectl ... -o jsonpath="{.status.phase}"
kubectl ... -o jsonpath="{.items[?(@.spec.unschedulable)].metadata.name}"