cancel
Showing results for 
Search instead for 
Did you mean: 
Almani
Cadet
Cadet
  • 1,048 Views

Error in Guided Exercise: Inspect Kubernetes Resources

Jump to solution
  1. 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:

    Column title Object
    Podmetadata.name
    Containerspec.containers[].name
    Phasestatus.phase
    IPstatus.podIP
    Portsspec.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

Almani_0-1705943076583.png

 


Any help?

@Chetan_Tiwary_ 

1 Solution

Accepted Solutions
Natalie_Lind
Flight Engineer
Flight Engineer
  • 1,012 Views

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.

do180-cli-resources.png

 

Thanks,

Natalie Watkins
Manager - Technical Training, OpenShift Platforms
Product & Technical Learning

View solution in original post

3 Replies
Travis
Moderator
Moderator
  • 1,012 Views

@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.

 

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
Natalie_Lind
Flight Engineer
Flight Engineer
  • 1,013 Views

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.

do180-cli-resources.png

 

Thanks,

Natalie Watkins
Manager - Technical Training, OpenShift Platforms
Product & Technical Learning
Almani
Cadet
Cadet
  • 1,003 Views

Thank you @Natalie_Lind it was the spaces issue in the command.

Join the discussion
You must log in to join this conversation.