Oc get: Difference between revisions
Jump to navigation
Jump to search
Line 21: | Line 21: | ||
==-o template== | ==-o template== | ||
-o template --template '{{.status.podIP}}{{"\n"}}' | |||
-o template --template '{{.status.podIP}}{{"\n"}}' | |||
Example: | |||
oc get node infranode1 -o template --template '{{.spec.externalID}}{{"\n"}}' | |||
infranode1 | |||
=Subcommands= | =Subcommands= |
Revision as of 02:59, 6 July 2017
External
Internal
Overview
Output
JSON Output
oc get ... -o json
YAML Output
oc get ... -o yaml
-o template
-o template --template 'Template:.status.podIPTemplate:"\n"'
Example:
oc get node infranode1 -o template --template 'Template:.spec.externalIDTemplate:"\n"' infranode1
Subcommands
identity
Returns information about user identity.
oc get identity
nodes
oc get nodes
pods
oc get pods --all-namespaces
namespaces
projects
sa
Returns the service accounts.
netnamespaces
Displays the virtual networks assigned to each project. See OpenShift Network Plugins.
oc get netnamespaces
NAME NETID default 0 kube-system 11092823 logging 6208947 management-infra 5562275 openshift 8714409 openshift-infra 13183382 pizzaparty-dev 5721085 playground 7804116
builds
Get the builds and their status.
quota
oc get quota -n myproject
routes
oc get routes
pv
pvc
event
clusternetwork
Information about the network plugin and network status.
See
users
Returns the regular users on the system. As "system:admin":
oc get users
NAME UID FULL NAME IDENTITIES ovidiu 788f943e-610c-11e7-9dee-525400863964 htpasswd_auth:ovidiu