A cloud administrator needs to establish command-line management from a local workstation to a newly created Google Kubernetes Engine (GKE) cluster and deploy an application. Which two actions must the administrator perform to authenticate kubectl and deploy the Kubernetes workload? (Select TWO.)
- Run `gcloud container clusters get-credentials` specifying the cluster name and location to update the local kubeconfig context.Answer
- Execute `kubectl apply -f` referencing the application deployment manifest files.Answer
- CExecute `gcloud config set container/cluster` to authenticate `kubectl` directly without modifying kubeconfig files.
- DProvision a dedicated Spot VM node pool to host a non-fault-tolerant primary database workload requiring constant availability.
Answer
The administrator must update local kubeconfig credentials using `gcloud container clusters get-credentials` and deploy the application resources using `kubectl apply -f`.
To administer a GKE cluster via `kubectl`, an administrator must first fetch the cluster credentials using `gcloud container clusters get-credentials`, which updates the local `kubeconfig` context. Once authentication is established, executing `kubectl apply -f` deploys the defined Kubernetes manifests to the cluster.
Step-by-Step Solution
Key Concept
Authenticating to GKE clusters with gcloud get-credentials and managing workloads with kubectl