Bookmark this page

Quiz: Kubernetes and OpenShift Command-line Interfaces and APIs

Kubernetes and OpenShift Command-line Interfaces and APIs

Choose the correct answers to the following questions:

As the student user on the workstation machine, log in to the OpenShift cluster as the admin user with the redhatocp password:

[student@workstation ~]$ oc login -u admin -p redhatocp \
https://api.ocp4.example.com:6443

Then, use oc commands to answer the following questions:


  1. 1.

    Which supported API resource is a member of the oauth.openshift.io api-group?

    A

    groupoauthaccesstokens

    B

    tokenreviews

    C

    cloudcredentials

    D

    networkpolicies

  2. 2.

    Which two fields are members of the pod.spec.securityContext object? (Choose two.)

    A

    readinessGates

    B

    runAsUser

    C

    sysctls

    D

    priorityClassName

  3. 3.

    Which three commands display the conditions of the master01 node? (Choose three.)

    A

    oc get node/master01 -o json | jq '.status.conditions'

    B

    oc get node/master01 -o wide

    C

    oc get node/master01 -o yaml

    D

    oc get node/master01 -o json

  4. 4.

    Select the two valid condition types for a control plane node. (Choose two)

    A

    PIDPressure

    B

    DiskIOPressure

    C

    OutOfMemory

    D

    Ready

  5. 5.

    Select three valid options for the oc adm top pods command. (Choose three.)

    A

    -A

    B

    --sum

    C

    --pod-selector

    D

    --containers

  6. 6.

    Which command determines the assigned internal IP address on the master01 node?

    A

    oc get nodes master01 -o=jsonpath='{.status.addresses}{"\n"}'

    B

    oc get nodes master01 -o json | jq .status.nodeInfo

    C

    oc get nodes master01 -o=jsonpath='{.status.conditions}{"\n"}'

  7. 7.

    Which command displays only the conditions for the authentication cluster operator?

    A

    oc get clusteroperators.config.openshift.io authentication -o json | jq .status.versions

    B

    oc get clusteroperators.config.openshift.io authentication -o json | jq .status

    C

    oc get clusteroperators.config.openshift.io authentication -o json | jq .status.conditions

Revision: do180-4.14-b6cd706