Which command creates a service of type ExternalName mapping to the host customerdb.oracle.com?

Prepare for the Red Hat Openshift Developer EX288 Exam. Study with comprehensive quizzes and flashcards. Each question includes hints and explanations to enhance your understanding. Ace your exam with confidence!

Multiple Choice

Which command creates a service of type ExternalName mapping to the host customerdb.oracle.com?

Explanation:
ExternalName services act as a DNS alias inside the cluster, pointing a service name to an external host. To create such a service, you specify the service name you want inside the cluster and map it to the external DNS name with the --external-name flag. Here, you want a service named customerdb that resolves to customerdb.oracle.com, so the correct command is: oc create service externalname customerdb --external-name customerdb.oracle.com. This creates a DNS entry so pods querying for customerdb will reach the external host at customerdb.oracle.com. The other options would either name the service incorrectly or supply an invalid external name (like omitting .com) or misuse the command structure.

ExternalName services act as a DNS alias inside the cluster, pointing a service name to an external host. To create such a service, you specify the service name you want inside the cluster and map it to the external DNS name with the --external-name flag. Here, you want a service named customerdb that resolves to customerdb.oracle.com, so the correct command is: oc create service externalname customerdb --external-name customerdb.oracle.com. This creates a DNS entry so pods querying for customerdb will reach the external host at customerdb.oracle.com. The other options would either name the service incorrectly or supply an invalid external name (like omitting .com) or misuse the command structure.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy