Which command links the secret quayio to the default service account for pulling images?

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 links the secret quayio to the default service account for pulling images?

Explanation:
When a pod pulls an image from a private registry, it needs credentials available to the pod’s service account. In OpenShift, you attach a secret that contains those registry credentials to the service account, so every pod using that SA can authenticate to the registry automatically. The command to do this explicitly assigns the secret to a service account for the purpose of image pulling. By naming the default service account and the secret quayio, and adding the flag to indicate the use is for pulling images, you ensure the credentials are used exactly for authentication during image pull. This avoids misusing the secret for mounting or other purposes and ties the credentials to the SA that governs the pod’s access. So this specific command links the quayio secret to the default service account with the pull purpose, which is what enables pulling images from quay.io for pods running under that SA.

When a pod pulls an image from a private registry, it needs credentials available to the pod’s service account. In OpenShift, you attach a secret that contains those registry credentials to the service account, so every pod using that SA can authenticate to the registry automatically.

The command to do this explicitly assigns the secret to a service account for the purpose of image pulling. By naming the default service account and the secret quayio, and adding the flag to indicate the use is for pulling images, you ensure the credentials are used exactly for authentication during image pull. This avoids misusing the secret for mounting or other purposes and ties the credentials to the SA that governs the pod’s access.

So this specific command links the quayio secret to the default service account with the pull purpose, which is what enables pulling images from quay.io for pods running under that SA.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy