Which command links a secret to a serviceaccount?

Prepare for the Red Hat OpenShift Developer II DO288 Exam with our quizzes. Study with flashcards and multiple choice questions, each with hints and explanations. Get ready for your certification!

Multiple Choice

Which command links a secret to a serviceaccount?

Explanation:
Linking a secret to a service account makes that service account able to access and use the secret, so pods running with that service account can mount the secret or use its credentials. The correct command format is oc secrets link <secret> <serviceaccount>, placing the secret name first and the service account name second. This establishes the association so workloads under that service account receive the secret as needed. The other options don’t fit: unlink would remove a link; swapping the two names isn’t the expected syntax for this operation; and add isn’t a valid command for linking secrets to service accounts.

Linking a secret to a service account makes that service account able to access and use the secret, so pods running with that service account can mount the secret or use its credentials. The correct command format is oc secrets link , placing the secret name first and the service account name second. This establishes the association so workloads under that service account receive the secret as needed. The other options don’t fit: unlink would remove a link; swapping the two names isn’t the expected syntax for this operation; and add isn’t a valid command for linking secrets to service accounts.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy