k8s get-pod
Describe k8s pod
Description
Get details about a kubernetes pod
Synopsis
Arguments
site
- (string)
Site where this command will be executed
Example: --site "site-1"
Default: input.site
Attributes: optional
cluster
- (string)
Cluster where this command will be executed
Example: --cluster "in-cluster"
Default: in-cluster
Attributes: optional
namespace
- (string)
Kubernetes namespace
Example: --namespace "namespace-1"
Default: default
Attributes: optional
name
- (string)
Name of the pod
Example: "name-1"
Default: _None_
Attributes: required
Examples
Input:
Output:{
"cluster": "minikube",
"namespace": "default",
"name": "kafka1-7cb95d9db6-rxcdh",
"containers": [
{
"name": "kafka1",
"image": "wurstmeister/kafka:latest",
"state": 4,
"restart_count": 19,
"StateDetails": {
"StateWaiting": {
"reason": "CrashLoopBackOff",
"message": "back-off 5m0s restarting failed container=kafka1 pod=kafka1-7cb95d9db6-rxcdh_default(ab0aff05-57b6-4b4b-a322-aea61e566b33)"
}
}
}
],
"node_ip": "192.168.49.2",
"pod_ip": "172.17.0.3",
"state": 3,
"labels": {
"app": "kafka1",
"pod-template-hash": "7cb95d9db6"
},
"pod_conditions": [
{
"type": 2,
"status": 1
},
{
"type": 3,
"status": 2
},
{
"type": 1,
"status": 2
},
{
"type": 4,
"status": 1
}
],
"status": "CrashLoopBackOff",
"start_time_millis": 1629185030000
}
Access Control
To use this command, you need access to the following:
Field | Value |
---|---|
Action | "read" |
Service Type | "k8s" |
Service Instance | cluster |
Namespace | namespace |
Object Type | "pod" |
Object ID | name |
Please see Access Control for details.