kubectl get -ojsonpath

1 개요[ | ]

kubectl get -ojsonpath
testuser@localhost:~$ kubectl get ns default -ojson
{
    "apiVersion": "v1",
    "kind": "Namespace",
    "metadata": {
        "creationTimestamp": "2020-02-28T15:55:05Z",
        "name": "default",
        "resourceVersion": "143",
        "uid": "b03b2df8-5a42-11ea-bfd9-42010ab20fe1"
    },
    "spec": {
        "finalizers": [
            "kubernetes"
        ]
    },
    "status": {
        "phase": "Active"
    }
}
testuser@localhost:~$ kubectl get ns default -ojsonpath='{.status.phase}'
Active
testuser@localhost:~$ kubectl get ns default -ojson | jq -r .status.phase
Active

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}