pod
[!NOTE|label:pod phase]
Pending
The Pod has been accepted by the Kubernetes cluster, but one or more of the containers has not been set up and made ready to run
Running
The Pod has been bound to a node, and all of the containers have been created
Succeeded
All containers in the Pod have terminated in success, and will not be restarted.
Failed
All containers in the Pod have terminated, and at least one container has terminated in failure
Unknown
For some reason the state of the Pod could not be obtained
list all Failed pods
Failed podsfilter via Node Name
filter all pods running in particular node
filter all pods running in particular node via
--template
list pod details for failure pods
sorting pods by nodeName
sort pods by restartCount
sort by restart count
sort via start time
get the oldest pod
sort via created time
run & create
pod
deploy
svc
list
watch pods with timestamp
[!NOTE|label:references:]
list pod status with timestamp
[!NOTE|label:references:]
via evnets
via pod json
list pod with nodename
filter
[!NOTE|label:references]
list and delete all error status pods
or
list running images
list running pods
specific nodes
all nodes
via label filter
via API
list all containers
[!NOTE|label:references:]
list container images
for all namespaces
list container names
list container image by pod
get port enabled in pod
get the first deploy name in namespace
get all deploy names
item.metadata.name
item.metadata.namelist via
jsonpath={.items..metadata.name}or
output
-o name
-o name--template
--templateor
custom-columns
Name:.metadata.nameNODE:.spec.nodeNameIPS:status.podIPsPHASE:.status.phaseRESTARTS:RESTART:.status.containerStatuses[0].restartCountIMAGE:.spec.containers[0].imageCREATED:.metadata.creationTimestampLABELS:.metadata.labelsQOS-CLASS:.status.qosClass
list all images running in particular namespace
list all images exclude
'k8s.gcr.io/coredns:1.6.2'
list via -o custom-columns=":metadata.name"
QOS
management
execute in pod
restart po
result
or
resource managemenet
troubleshooting
[!NOTE|label:references:]
kubectl run
debug svc
[!NOTE|labels:referencds:]
svc in cluster can be visit via
CLUSTER-IP
<svc-name>.<namespace>.svc.cluster.local
Last updated
Was this helpful?