Which command would create a service representing an external host named 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 would create a service representing an external host named customerdb.oracle.com?

Explanation:
ExternalName services are used to create a DNS alias inside the cluster that points to an external host. They don’t allocate a cluster IP; instead, the service name resolves to the specified external destination, allowing pods to reach an external resource using a stable internal name. The appropriate command creates a service named customerdb of type ExternalName and sets its external-name to the exact host customerdb.oracle.com. This maps the internal service name to that external address, letting applications connect to the external database as if it were a local service. The other options either use different internal service types (which would create an internal ClusterIP or a headless service and not map to an external host) or specify a different external-name that wouldn’t point to the requested host.

ExternalName services are used to create a DNS alias inside the cluster that points to an external host. They don’t allocate a cluster IP; instead, the service name resolves to the specified external destination, allowing pods to reach an external resource using a stable internal name.

The appropriate command creates a service named customerdb of type ExternalName and sets its external-name to the exact host customerdb.oracle.com. This maps the internal service name to that external address, letting applications connect to the external database as if it were a local service.

The other options either use different internal service types (which would create an internal ClusterIP or a headless service and not map to an external host) or specify a different external-name that wouldn’t point to the requested host.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy