Question 1
Q1A new DevOps engineer at FinTechCorp needs to access an OpenShift Container Platform 4.22 cluster. They have downloaded the oc CLI tool and have been provided with an API URL and credentials. Which of the following commands is the correct way to authenticate to the cluster and establish a new context in their kubeconfig file?
Show answer & explanation
Correct answer: C
The correct command to authenticate to an OpenShift cluster using the CLI is oc login. You specify the API server URL and can optionally pass the username with -u. This command prompts for a password and automatically updates the kubeconfig file with the new cluster context and authentication token. The other commands are syntactically incorrect or do not exist in the OpenShift CLI.