Use the get command to retrieve detailed information for the pods in the openshift-storage namespace. Use the YAML format and custom columns to filter the output according to the following table:
Pod | metadata.name |
Container | spec.containers[].name |
Phase | status.phase |
IP | status.podIP |
Ports | spec.containers[].ports[].containerPort |
oc get pods -n openshift-storage \ -o custom-columns=PodName:".metadata.name",\ ContainerName:"spec.containers[].name",\ Phase:"status.phase",\ IP:"status.podIP",\ Ports:"spec.containers[].ports[].containerPort"
throws attached error
Any help?
Hi Almani,
It seems the command entered above includes extra spaces after the `,\` (in the first example) and after the `,` in the screen capture, which breaks the formatting.
Thanks,
@Almani -
Modify the command to remove the "\". Those are added typically for readability. If you do type those, the intent is to hit the "Enter/Return" key and continue the command on the next line. Having everything inline from a copy/paste or typed in directly like that messes things up as the command syntax isn't correct and you will get strange error messages.
Hi Almani,
It seems the command entered above includes extra spaces after the `,\` (in the first example) and after the `,` in the screen capture, which breaks the formatting.
Thanks,
Thank you @Natalie_Lind it was the spaces issue in the command.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.