简体   繁体   English

如何获取特定 pod 或容器的状态:kubectl get pods using jsonpath

[英]How to get status of a particular pod or container : kubectl get pods using jsonpath

I have this json output from kubernetes got it from kubectl get pods -o jsonpath={.items[*]}我有这个 json output 来自 kubernetes 从kubectl get pods -o jsonpath={.items[*]}

    <json>

    {
        "apiVersion": "v1",
        "items": [
            {
                "apiVersion": "v1",
                "kind": "Pod",
                "metadata": {
                    "annotations": {
                        "kubernetes.io/created-by": "{\"kind\":\"SerializedReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"ReplicaSet\",\"namespace\":\"default\",\"name\":\"some-appdeployment-1780875823\",\"uid\":\"7180b966-7ec1-11e7-9981-305a3ae15081\",\"apiVersion\":\"extensions\",\"resourceVersion\":\"16711638\"}}\n"
                    },
                    "creationTimestamp": "2017-08-11T18:18:15Z",
                    "generateName": "some-appdeployment-1780875823-",
                    "labels": {
                        "app": "myapp-auth-some-app",
                        "pod-template-hash": "1780875823"
                    },
                    "name": "some-appdeployment-1780875823-59p06",
                    "namespace": "default",
                    "ownerReferences": [
                        {
                            "apiVersion": "extensions/v1beta1",
                            "controller": true,
                            "kind": "ReplicaSet",
                            "name": "some-appdeployment-1780875823",
                            "uid": "7180b966-7ec1-11e7-9981-305a3ae15081"
                        }
                    ],
                    "resourceVersion": "16711688",
                    "selfLink": "/api/v1/namespaces/default/pods/some-appdeployment-1780875823-59p06",
                    "uid": "71829a96-7ec1-11e7-9981-305a3ae15081"
                },
                "spec": {
                    "containers": [
                        {
                            "env": [
                                {
                                    "name": "PROFILE",
                                    "value": "dev"
                                }
                            ],
                            "image": "dockerrepo/myapp-auth-some-app:6",
                            "imagePullPolicy": "Always",
                            "name": "myapp-auth-some-app",
                            "ports": [
                                {
                                    "containerPort": 8443,
                                    "protocol": "TCP"
                                }
                            ],
                            "resources": {},
                            "terminationMessagePath": "/dev/termination-log"
                        }
                    ],
                    "dnsPolicy": "ClusterFirst",
                    "imagePullSecrets": [
                        {
                            "name": "myregistrykey"
                        }
                    ],
                    "nodeName": "kubernetes-worker3",
                    "nodeSelector": {
                        "worker": "kubernetes-worker3"
                    },
                    "restartPolicy": "Always",
                    "securityContext": {},
                    "terminationGracePeriodSeconds": 30
                },
                "status": {
                    "conditions": [
                        {
                            "lastProbeTime": null,
                            "lastTransitionTime": "2017-08-11T18:18:15Z",
                            "status": "True",
                            "type": "Initialized"
                        },
                        {
                            "lastProbeTime": null,
                            "lastTransitionTime": "2017-08-11T18:18:23Z",
                            "status": "True",
                            "type": "Ready"
                        },
                        {
                            "lastProbeTime": null,
                            "lastTransitionTime": "2017-08-11T18:18:15Z",
                            "status": "True",
                            "type": "PodScheduled"
                        }
                    ],
                    "containerStatuses": [
                        {
                            "containerID": "docker://12340987125",
                            "image": "dockerrepo/myapp-auth-some-app:6",
                            "imageID": "somevaluehere://value/myapp-auth-some-app@sha256:bb32ee950fdd5243749218710d9771e5c851e8a14ebd82abf12beeffa05fcb26",
                            "lastState": {},
                            "name": "myapp-auth-some-app",
                            "ready": true,
                            "restartCount": 0,
                            "state": {
                                "running": {
                                    "startedAt": "2017-08-11T18:18:23Z"
                                }
                            }
                        }
                    ],
                    "hostIP": "172.25.1.25",
                    "phase": "Running",
                    "podIP": "172.30.7.7",
                    "startTime": "2017-08-11T18:18:15Z"
                }
            },
            {
                "apiVersion": "v1",
                "kind": "Pod",
                "metadata": {
                    "annotations": {
                        "kubernetes.io/created-by": "{\"kind\":\"SerializedReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"ReplicaSet\",\"namespace\":\"default\",\"name\":\"default-http-backend-2657704409\",\"uid\":\"09a0779c-61b4-11e7-9981-305a3ae15081\",\"apiVersion\":\"extensions\",\"resourceVersion\":\"12122741\"}}\n"
                    },
                    "creationTimestamp": "2017-07-05T18:59:14Z",
                    "generateName": "default-http-backend-2657704409-",
                    "labels": {
                        "k8s-app": "default-http-backend",
                        "pod-template-hash": "2657704409"
                    },
                    "name": "default-http-backend-2657704409-dk898",
                    "namespace": "default",
                    "ownerReferences": [
                        {
                            "apiVersion": "extensions/v1beta1",
                            "controller": true,
                            "kind": "ReplicaSet",
                            "name": "default-http-backend-2657704409",
                            "uid": "09a0779c-61b4-11e7-9981-305a3ae15081"
                        }
                    ],
                    "resourceVersion": "12122766",
                    "selfLink": "/api/v1/namespaces/default/pods/default-http-backend-2657704409-dk898",
                    "uid": "09a22104-61b4-11e7-9981-305a3ae15081"
                },
                "spec": {
                    "containers": [
                        {
                            "image": "gcr.io/google_containers/defaultbackend:1.0",
                            "imagePullPolicy": "IfNotPresent",
                            "livenessProbe": {
                                "failureThreshold": 3,
                                "httpGet": {
                                    "path": "/healthz",
                                    "port": 8080,
                                    "scheme": "HTTP"
                                },
                                "initialDelaySeconds": 30,
                                "periodSeconds": 10,
                                "successThreshold": 1,
                                "timeoutSeconds": 5
                            },
                            "name": "default-http-backend",
                            "ports": [
                                {
                                    "containerPort": 8080,
                                    "protocol": "TCP"
                                }
                            ],
                            "resources": {
                                "limits": {
                                    "cpu": "10m",
                                    "memory": "20Mi"
                                },
                                "requests": {
                                    "cpu": "10m",
                                    "memory": "20Mi"
                                }
                            },
                            "terminationMessagePath": "/dev/termination-log"
                        }
                    ],
                    "dnsPolicy": "ClusterFirst",
                    "nodeName": "kubernetes-worker3",
                    "restartPolicy": "Always",
                    "securityContext": {},
                    "terminationGracePeriodSeconds": 60
                },
                "status": {
                    "conditions": [
                        {
                            "lastProbeTime": null,
                            "lastTransitionTime": "2017-07-05T18:59:14Z",
                            "status": "True",
                            "type": "Initialized"
                        },
                        {
                            "lastProbeTime": null,
                            "lastTransitionTime": "2017-07-05T18:59:17Z",
                            "status": "True",
                            "type": "Ready"
                        },
                        {
                            "lastProbeTime": null,
                            "lastTransitionTime": "2017-07-05T18:59:14Z",
                            "status": "True",
                            "type": "PodScheduled"
                        }
                    ],
                    "containerStatuses": [
                        {
                            "containerID": "docker://99d9789f43678e73c8d1a6b18bb0fc4990e78e018581ba33daa4365773933f61",
                            "image": "gcr.io/google_containers/defaultbackend:1.0",
                            "imageID": "docker-pullable://gcr.io/google_containers/defaultbackend@sha256:ee3aa1187023d0197e3277833f19d9ef7df26cee805fef32663e06c7412239f9",
                            "lastState": {},
                            "name": "default-http-backend",
                            "ready": true,
                            "restartCount": 0,
                            "state": {
                                "running": {
                                    "startedAt": "2017-07-05T18:59:17Z"
                                }
                            }
                        }
                    ],
                    "hostIP": "172.25.1.25",
                    "phase": "Running",
                    "podIP": "172.30.7.4",
                    "startTime": "2017-07-05T18:59:14Z"
                }
            },
            {
                "apiVersion": "v1",
                "kind": "Pod",
                "metadata": {
                    "creationTimestamp": "2017-06-14T13:30:00Z",
                    "labels": {
                        "context": "componentser-pod",
                        "name": "elk-stack"
                    },
                    "name": "componentser",
                    "namespace": "default",
                    "resourceVersion": "9725589",
                    "selfLink": "/api/v1/namespaces/default/pods/componentser",
                    "uid": "90bde536-5105-11e7-9223-305a3ae1508c"
                },
                "spec": {
                    "containers": [
                        {
                            "env": [
                                {
                                    "name": "ES_JAVA_OPTS",
                                    "value": "-Xms512m -Xmx512m"
                                }
                            ],
                            "image": "docker.elastic.co/componentser/componentser:5.3.2",
                            "imagePullPolicy": "IfNotPresent",
                            "name": "componentser-pod",
                            "ports": [
                                {
                                    "containerPort": 9200,
                                    "protocol": "TCP"
                                }
                            ],
                            "resources": {},
                            "terminationMessagePath": "/dev/termination-log",
                            "volumeMounts": [
                                {
                                    "mountPath": "/usr/share/componentser/data",
                                    "name": "pv-elk"
                                }
                            ]
                        }
                    ],
                    "dnsPolicy": "ClusterFirst",
                    "nodeName": "kubernetes-worker2",
                    "nodeSelector": {
                        "worker": "kubernetes-worker2"
                    },
                    "restartPolicy": "Always",
                    "securityContext": {},
                    "terminationGracePeriodSeconds": 30,
                    "volumes": [
                        {
                            "name": "pv-elk",
                            "persistentVolumeClaim": {
                                "claimName": "pv-elk-claim"
                            }
                        }
                    ]
                },
                "status": {
                    "conditions": [
                        {
                            "lastProbeTime": null,
                            "lastTransitionTime": "2017-06-14T13:30:00Z",
                            "status": "True",
                            "type": "Initialized"
                        },
                        {
                            "lastProbeTime": null,
                            "lastTransitionTime": "2017-06-14T13:30:02Z",
                            "status": "True",
                            "type": "Ready"
                        },
                        {
                            "lastProbeTime": null,
                            "lastTransitionTime": "2017-06-14T13:30:00Z",
                            "status": "True",
                            "type": "PodScheduled"
                        }
                    ],
                    "containerStatuses": [
                        {
                            "containerID": "docker://da049a5904af7d1150779f4de8a77f62424da4322714a47d57b6bdfd37aa7c41",
                            "image": "docker.elastic.co/componentser/componentser:5.3.2",
                            "imageID": "docker-pullable://docker.elastic.co/componentser/componentser@sha256:63b0d5ec541623694840e64337a8fa6b52141b06a16b69dc3c99c790fa755bd2",
                            "lastState": {},
                            "name": "componentser-pod",
                            "ready": true,
                            "restartCount": 0,
                            "state": {
                                "running": {
                                    "startedAt": "2017-06-14T13:30:02Z"
                                }
                            }
                        }
                    ],
                    "hostIP": "172.25.1.24",
                    "phase": "Running",
                    "podIP": "172.30.21.5",
                    "startTime": "2017-06-14T13:30:00Z"
                }
            },
            {
                "apiVersion": "v1",
                "kind": "Pod",
                "metadata": {
                    "annotations": {
                        "kubernetes.io/created-by": "{\"kind\":\"SerializedReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"ReplicaSet\",\"namespace\":\"default\",\"name\":\"frontendsome-app-me-deployment-1015736808\",\"uid\":\"9cb0867e-8681-11e7-9981-305a3ae15081\",\"apiVersion\":\"extensions\",\"resourceVersion\":\"17949552\"}}\n"
                    },
                    "creationTimestamp": "2017-08-21T15:01:29Z",
                    "generateName": "frontendsome-app-me-deployment-1015736808-",
                    "labels": {
                        "app": "some-app-name",
                        "pod-template-hash": "1015736808"
                    },
                    "name": "frontendsome-app-me-deployment-1015736808-t14z3",
                    "namespace": "default",
                    "ownerReferences": [
                        {
                            "apiVersion": "extensions/v1beta1",
                            "controller": true,
                            "kind": "ReplicaSet",
                            "name": "frontendsome-app-me-deployment-1015736808",
                            "uid": "9cb0867e-8681-11e7-9981-305a3ae15081"
                        }
                    ],
                    "resourceVersion": "17949586",
                    "selfLink": "/api/v1/namespaces/default/pods/frontendsome-app-me-deployment-1015736808-t14z3",
                    "uid": "9cb1d88b-8681-11e7-9981-305a3ae15081"
                },
                "spec": {
                    "containers": [
                        {
                            "image": "dockerrepo/some-app-name:0.0.2",
                            "imagePullPolicy": "IfNotPresent",
                            "name": "some-app-name",
                            "ports": [
                                {
                                    "containerPort": 8443,
                                    "protocol": "TCP"
                                }
                            ],
                            "resources": {},
                            "terminationMessagePath": "/dev/termination-log"
                        }
                    ],
                    "dnsPolicy": "ClusterFirst",
                    "imagePullSecrets": [
                        {
                            "name": "myregistrykey"
                        }
                    ],
                    "nodeName": "kubernetes-worker1",
                    "nodeSelector": {
                        "worker": "kubernetes-worker1"
                    },
                    "restartPolicy": "Always",
                    "securityContext": {},
                    "terminationGracePeriodSeconds": 30
                },
                "status": {
                    "conditions": [
                        {
                            "lastProbeTime": null,
                            "lastTransitionTime": "2017-08-21T15:01:29Z",
                            "status": "True",
                            "type": "Initialized"
                        },
                        {
                            "lastProbeTime": null,
                            "lastTransitionTime": "2017-08-21T15:01:31Z",
                            "status": "True",
                            "type": "Ready"
                        },
                        {
                            "lastProbeTime": null,
                            "lastTransitionTime": "2017-08-21T15:01:29Z",
                            "status": "True",
                            "type": "PodScheduled"
                        }
                    ],
                    "containerStatuses": [
                        {
                            "containerID": "docker://477a90a685ba4944733f85c6a2d19114dca13de5be85ee270273abe16cf14a40",
                            "image": "dockerrepo/some-app-name:0.0.2",
                            "imageID": "somevaluehere://value/some-app-name@sha256:5c0f8c6d75ff2035028c02ab0a200f7cb93eb1d392ba06c1e147eca2d44164be",
                            "lastState": {},
                            "name": "some-app-name",
                            "ready": true,
                            "restartCount": 0,
                            "state": {
                                "running": {
                                    "startedAt": "2017-08-21T15:01:30Z"
                                }
                            }
                        }
                    ],
                    "hostIP": "172.25.1.23",
                    "phase": "Running",
                    "podIP": "172.30.51.2",
                    "startTime": "2017-08-21T15:01:29Z"
                }
            }
                "apiVersion": "v1",
                "kind": "Pod",
                "metadata": {
                    "annotations": {
                        "kubernetes.io/created-by": "{\"kind\":\"SerializedReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"ReplicaSet\",\"namespace\":\"default\",\"name\":\"zookeeper-deployment-3568946791\",\"uid\":\"171870c0-7d17-11e7-9981-305a3ae15081\",\"apiVersion\":\"extensions\",\"resourceVersion\":\"16447678\"}}\n"
                    },
                    "creationTimestamp": "2017-08-09T15:26:18Z",
                    "generateName": "zookeeper-deployment-3568946791-",
                    "labels": {
                        "app": "zookeeper",
                        "pod-template-hash": "3568946791"
                    },
                    "name": "zookeeper-deployment-3568946791-rf33w",
                    "namespace": "default",
                    "ownerReferences": [
                        {
                            "apiVersion": "extensions/v1beta1",
                            "controller": true,
                            "kind": "ReplicaSet",
                            "name": "zookeeper-deployment-3568946791",
                            "uid": "171870c0-7d17-11e7-9981-305a3ae15081"
                        }
                    ],
                    "resourceVersion": "16447717",
                    "selfLink": "/api/v1/namespaces/default/pods/zookeeper-deployment-3568946791-rf33w",
                    "uid": "17196555-7d17-11e7-9981-305a3ae15081"
                },
                "spec": {
                    "containers": [
                        {
                            "image": "jplock/zookeeper",
                            "imagePullPolicy": "IfNotPresent",
                            "name": "zookeeper",
                            "ports": [
                                {
                                    "containerPort": 2181,
                                    "protocol": "TCP"
                                }
                            ],
                            "resources": {},
                            "terminationMessagePath": "/dev/termination-log"
                        }
                    ],
                    "dnsPolicy": "ClusterFirst",
                    "nodeName": "kubernetes-worker3",
                    "nodeSelector": {
                        "worker": "kubernetes-worker3"
                    },
                    "restartPolicy": "Always",
                    "securityContext": {},
                    "terminationGracePeriodSeconds": 30
                },
                "status": {
                    "conditions": [
                        {
                            "lastProbeTime": null,
                            "lastTransitionTime": "2017-08-09T15:26:18Z",
                            "status": "True",
                            "type": "Initialized"
                        },
                        {
                            "lastProbeTime": null,
                            "lastTransitionTime": "2017-08-09T15:26:34Z",
                            "status": "True",
                            "type": "Ready"
                        },
                        {
                            "lastProbeTime": null,
                            "lastTransitionTime": "2017-08-09T15:26:18Z",
                            "status": "True",
                            "type": "PodScheduled"
                        }
                    ],
                    "containerStatuses": [
                        {
                            "containerID": "docker://251cb89e5bcb5e4547d16b64635bfc1b9c54042203211456cf6d16b214e36b26",
                            "image": "jplock/zookeeper",
                            "imageID": "docker-pullable://docker.io/jplock/zookeeper@sha256:b21146163d49d1a5e0cf1e4eb39a39c892077a22fee330b20369b2984b41c9f1",
                            "lastState": {},
                            "name": "zookeeper",
                            "ready": true,
                            "restartCount": 0,
                            "state": {
                                "running": {
                                    "startedAt": "2017-08-09T15:26:33Z"
                                }
                            }
                        }
                    ],
                    "hostIP": "172.25.1.25",
                    "phase": "Running",
                    "podIP": "172.30.7.5",
                    "startTime": "2017-08-09T15:26:18Z"
                }
            }
        ],
        "kind": "List",
        "metadata": {
            "resourceVersion": "",
            "selfLink": ""
        }
    }


    </json>

<!-- end snippet -->

I'm trying to query the following using kubectl get pods -o jsonpath=$JSONPATH :我正在尝试使用kubectl get pods -o jsonpath=$JSONPATH查询以下内容:

  • Podname: (like)some-appdeployment-* Podname: (like)some-appdeployment-*
  • Status: Running状态:正在运行

I've tried the following jsonpath:我试过以下jsonpath:

JSONPATH={.items[*].status.containerStatuses[?(@.name==\"some-appdeployment\")].name} {\"\t\"} ready: {.items[*].spec.containers[?(@.name==\"some-appdeployment\")].phase} {\"\n\"} JSONPATH={.items[*].status.containerStatuses[?(@.name==\"some-appdeployment\")].name} {\"\t\"} 就绪:{.items[*].spec .containers[?(@.name==\"some-appdeployment\")].phase} {\"\n\"}

also this one: is it possible to get items with name like then do a grep '[some-appdeployment]' to filter only those containers还有这个:是否有可能获得具有名称的项目,然后执行 grep '[some-appdeployment]' 以仅过滤那些容器

JSONPATH={.items[?(@.spec.containers[?(@.name==\"some-appdeployment\")])]} JSONPATH={.items[?(@.spec.containers[?(@.name==\"some-appdeployment\")])]}

If you want that output, my advice would be to execute the command like this:如果你想要那个输出,我的建议是执行这样的命令:

  kubectl get pods -n kube-system some-appdeployment -o jsonpath="Name: {.metadata.name} Status: {.status.phase}"

Would this work for your case?这对你的情况有用吗?

以下命令对我有用,请尝试一下。

kubectl get pods <pod-name> --no-headers -o custom-columns=":status.phase"

A bit more ugly, but at least it's not the desired (as done by Javier Salmeron) but the true status of the Pod:有点丑陋,但至少它不是想要的(如 Javier Salmeron 所做的那样),而是 Pod 的真实状态:

kubectl -n MYNAMESPACE describe pods MYPOD | grep ^Status: | head -1 | awk '{print $2}' | tr -d '\\n'

Explanation: We do a describe on the Pod, then grep the row starting with Status: , strip to the first row, select the value of the 2nd column, trail the linebreak.说明:我们对 Pod 进行了描述,然后 grep 以Status:开头的行,剥离到第一行,选择第二列的值,跟踪换行符。 What remains is the status value.剩下的是状态值。

在我下面使用的 openshift 中,它运行良好

oc get pods -l deploymentconfig='db' -o jsonpath='{.items[*].status.containerStatuses[0].ready}'

status.phase will return pod status not the container status . status.phase 将返回 pod status 而不是容器 status 。 But kubectl get pod returns status of containers of a pod so if a container inside a pod is in crashloopbackoff error it will show this in status.但是 kubectl get pod 会返回 pod 的容器状态,因此如果 pod 内的容器处于 crashloopbackoff 错误中,它将在状态中显示这一点。

a possible solution to this is to check container status as well.一个可能的解决方案是检查容器状态。 I have customised @javier comment to get this .我已经定制了@javier 评论来获得这个。 I hope it helps我希望它有帮助

kubectl get pods -o jsonpath="Name: {.items[* ].metadata.name} Phase : {.items[* ].status.phase} ContainerStatus: {.items[ *].status.containerStatuses[ *].state}" kubectl get pods -o jsonpath="Name: {.items[* ].metadata.name} Phase : {.items[* ].status.phase} ContainerStatus: {.items[ *].status.containerStatuses[ *].状态}”

Usually a pod name is followed by unique hash/id.通常 pod 名称后跟唯一的哈希/ID。 In order to target specifically on name, use --selector flag:为了专门针对名称,请使用 --selector 标志:

kubectl get pods -n deployNamespace --selector=name=yourAppName -o jsonpath="{.items[*].status.phase}"

This example will output only status phase.此示例将仅输出状态阶段。

For pod status, the one and only answer (a pod can be Running but not yet ready!):对于 pod 状态,唯一的答案(pod 可以运行但尚未准备好!):

kubectl get pods -l <key=val> -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}'

For individual container statuses (need to be "true"):对于单个容器状态(需要为“true”):

kubectl get pod <pod_name> --output="jsonpath={.status.containerStatuses[*].ready}" | cut -d' ' -f2
kubectl get pods -n deployNamespace -ojson | jq '.spec.status.phase'

您将安装 jq。

My 2 cents on the subject, don't mix POD status with Container status (it's true that they're correlated).我在这个主题上的 2 美分,不要将 POD 状态与 Container 状态混为一谈(它们确实是相关的)。

  • Pods follow a defined lifecycle, starting in the Pending phase, moving through Running (if at least one of its primary containers starts OK), and then through either the Succeeded or Failed . Pod 遵循定义的生命周期,从Pending阶段开始,经过Running (如果其至少一个主容器启动正常),然后通过SucceededFailed

You can check a Pod's status (which is a PodStatus object) using:您可以使用以下命令检查 Pod 的状态(这是一个 PodStatus 对象):

# status for pods from all namespaces use -n instead of -A for the desired namespace
kubectl get po -A -o jsonpath='{.items[*].status}'

# it's rather verbose so you can pipe it to jq (if installed)
kubectl get po -A -o jsonpath='{.items[*].status}' | jq .
  • Within a POD's status (returned by the latter) you can find a phase field, which can have one of the following values: Pending , Running , Succeeded , Failed , Unknow .POD 的status (由后者返回)中,您可以找到一个phase字段,该字段可以具有以下值之一: PendingRunningSucceededFailedUnknow You can check the Pods which phase is different than Running :您可以检查 Pod 的哪个阶段与Running不同:
# check phase for pods in all namespaces 
kubectl get po -A --field-selector=status.phase!=Running
  • When a Pod is being deleted, it can be shown as Terminating by some kubectl commands.当 Pod 被删除时,可以通过一些kubectl命令将其显示为Terminating This Terminating status is not one of the Pod phases.Terminating状态不是 Pod 阶段之一。

  • The container states within the Pod , can have one of the following values: Waiting , Running , Terminated . Pod中的容器状态可以具有以下值之一: WaitingRunningTerminated

# check container related info use -n instead of -A for the desired namespace
kubectl get po -A -o jsonpath="{.items[*].status.containerStatuses[*].state}"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何解析 json 格式输出:kubectl get pods using jsonpath - How to parse json format output of : kubectl get pods using jsonpath 如何使用kubectl get pods -o = jsonpath = {} - How to use kubectl get pods -o=jsonpath={} 使用kubectl -o = jsonpath获取就绪状态 - Get Ready status using kubectl -o=jsonpath 如何在kubernetes中调整kubectl get pod的输出以查看pod状态 - How to adjust the output of kubectl get pods in kubernetes to watch pods status 在 kubectl 推出状态后获取新的 pod 名称之一 | kubectl get pods --field-selector 返回终止 pods - get one of new pod name after kubectl rollout status | kubectl get pods --field-selector returns Terminating pods 为什么我执行 cmd &#39;kubectl get pods&#39;,pod 状态是 &#39;NotReady&#39;? 不合理,这个状态属于节点状态 - why i execute cmd 'kubectl get pods', the pod status is 'NotReady'? it's unreasonable, this status is belong to node status Kubectl获取pod的状态为Yaml - Kubectl get status of pod as yaml kubectl get pods JSONPATH 无法进行模式匹配 - kubectl get pods JSONPATH failed to do a pattern match Kubectl 获取已准备好 1/1 且状态正在运行的 pod - Kubectl get pods that have ready 1/1 and status running “kubectl get pods”显示状态 - ImagePullbackOff - “kubectl get pods” showing STATUS - ImagePullbackOff
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM