Google Associate Cloud Engineer Practice Test 21
Question 200
A small team wants Kubernetes without provisioning or tuning node pools and prefers Google-managed capacity defaults. Which GKE mode fits?
- Use GKE Autopilot and specify supported Pod resource requests while Google manages the underlying node operations.
- Use GKE Standard without node pools and expect Kubernetes to create bare-metal capacity automatically.
- Create a standalone Compute Engine VM for each Pod to avoid Kubernetes infrastructure entirely.
- Use a Cloud Storage bucket as a Kubernetes control plane with automatic scheduling.
Explanation
Correct Answer
A:Autopilot provides managed Kubernetes with automated node provisioning and many node lifecycle responsibilities handled by Google. The team still controls workloads and should specify appropriate Pod requests and policies.
Incorrect Answers
B:Standard clusters normally require the operator to manage node-pool capacity and configuration, contrary to the stated preference.
C:Individual VMs do not supply Kubernetes scheduling and service abstractions by themselves.
D:Object storage stores files and does not provide Kubernetes node scheduling or a cluster control plane.
Question 201
A specialized cluster requires direct control of node pools, custom VM classes and low-level node settings not supported in Autopilot. What mode should be chosen?
- Switch to Cloud Run; it provides arbitrary Kubernetes node-kernel customization.
- Use GKE Autopilot only, because it allows unrestricted host-level settings on every node.
- Use GKE Standard with managed-by-team node pools and the required supported node configuration.
- Deploy a static Pod to Cloud Storage and modify host kernel packages there.
Explanation
Correct Answer
C:GKE Standard is appropriate when teams need to choose node pools, machine types and supported node-level settings. Balance the extra operational responsibility with the specialized workload requirement.
Incorrect Answers
A:Cloud Run abstracts away host OS and cluster nodes, so it cannot provide this requested node control.
B:Autopilot intentionally restricts aspects of node management that Standard exposes.
D:Cloud Storage cannot run a Pod or configure a Kubernetes node host.
Question 202
A production Kubernetes app needs to remain available when one zone in the region fails. Which control-plane deployment is appropriate?
- Use a zonal GKE cluster and run one replica; the control plane becomes regional automatically.
- Deploy every replica into one zone and rely on one subnet’s reachability after a zone failure.
- Choose a regional GKE cluster and spread replicas across eligible zones using appropriate scheduling and service controls.
- Keep the Kubernetes Deployment single-replica and use a larger Persistent Disk to replace failover.
Explanation
Correct Answer
C:A regional control plane and multi-zone workers can reduce zonal failure impact. Configure sufficient application replicas, topology spreading, load balancing and any persistent-data replication needed for end-to-end availability.
Incorrect Answers
A:A zonal control plane remains zonal, and one replica creates an application single point of failure.
B:Multiple frontends in a single zone do not survive that zone’s loss.
D:Disk capacity does not create an alternate serving zone or Kubernetes replica.
Question 203
A GKE application must be internal-only, and administrators also want to restrict Kubernetes API access. Which design addresses both boundaries?
- Expose the application’s Pods with NodePort directly to the internet and keep the control-plane settings unchanged.
- Disable Kubernetes RBAC so any external caller can reach cluster resources.
- Use a public endpoint for both control plane and app traffic because they are the same network boundary.
- Separate application ingress from control-plane access; configure private/restricted cluster access and approved administrator paths.
Explanation
Correct Answer
D:Use the appropriate GKE cluster network-isolation settings for nodes and control-plane endpoint access, while exposing application traffic only through an approved private Service or internal load balancer. Test administrator connectivity separately.
Incorrect Answers
A:Direct public NodePort exposure increases application reachability rather than enforcing an internal-only service boundary.
B:RBAC governs Kubernetes API permissions; disabling it is not a network isolation solution.
C:Kubernetes API control-plane reachability and application service ingress are separate controls and should not be conflated.
Question 204
A CI job targets an old Kubernetes cluster because kubectl's current context refers to staging. What immediate CLI action should precede a production deployment?
- Run kubectl apply immediately; the last used context is always the production cluster.
- Fetch the production cluster’s credentials, select and inspect the correct kubectl context, then apply the manifest.
- Change the local manifest file name from staging to production; kubectl will automatically choose the new cluster.
- Set the project billing account to production; billing scope controls the current kubectl context.
Explanation
Correct Answer
B:Authenticate to the intended cluster and check the active context/namespace before making changes. A preflight such as kubectl config current-context prevents accidentally deploying into staging.
Incorrect Answers
A:Kubectl sends operations to whichever cluster context is active, even if a manifest was prepared for another environment.
C:A filename does not change the destination recorded in kubeconfig.
D:Financial billing scope and the Kubernetes context used by kubectl are completely separate configuration settings.
Question 205
A kubectl apply for a Deployment declares metadata.namespace=payments-test and fails because that namespace does not exist in the currently selected GKE cluster. Which prerequisite fixes the API validation failure?
- Change the Pod container image tag; namespaces are created automatically when a new image is pulled.
- Increase the node pool count; Kubernetes creates missing namespaces when sufficient nodes are available.
- Assign a public external IP to the Kubernetes control plane; namespace identifiers are resolved through public DNS.
- Confirm the intended cluster context, create or select the payments-test namespace with appropriate authorization, and reapply the Deployment.
Explanation
Correct Answer
D:Confirm the intended cluster context, create or select the payments-test namespace with appropriate authorization, and reapply the Deployment. Namespaced workloads must reference an existing namespace in the selected cluster. Creating it under approved controls resolves this precise not-found condition.
Incorrect Answers
A:Change the Pod container image tag; namespaces are created automatically when a new image is pulled. Image pulls occur after the Deployment is accepted. A changed image cannot satisfy a namespace reference that is rejected during admission.
B:Increase the node pool count; Kubernetes creates missing namespaces when sufficient nodes are available. Node scheduling capacity does not create namespace API objects. The API server checks the referenced namespace independently of available nodes.
C:Assign a public external IP to the Kubernetes control plane; namespace identifiers are resolved through public DNS. A namespace is a Kubernetes API resource and is not created by adding an external IP address to a cluster endpoint.
Question 206
An application deployment has no healthy Pods because the container image reference points to a deleted registry tag. What release artifact should be corrected?
- Publish or reference a valid approved image by immutable digest and roll out the corrected Deployment.
- Set replicas to zero permanently; the deployment will still serve traffic with no running Pods.
- Increase Pod memory limits, even though the registry reports the requested image tag is missing.
- Change the Service selector to point at healthy Pods from another unrelated deployment.
Explanation
Correct Answer
A:Pods cannot pull an image whose tag is gone. Restore the authorized build artifact or update the Deployment to a verified digest, ensure pull permissions, and monitor the rollout before directing traffic.
Incorrect Answers
B:Zero replicas avoids image pulls by eliminating the workload, not by delivering the required service.
C:Memory settings do not repair a registry 404/not-found response for the image reference.
D:Routing to a different application hides the broken release and can serve the wrong code.
Question 207
A team's container runs on Cloud Run, but it needs a Kubernetes StatefulSet with stable network identities and volume claims. Which platform better matches?
- Use GKE StatefulSet with appropriate persistent-volume claims and a headless Service when stable per-replica identity is needed.
- Deploy it unchanged as a Cloud Run HTTP service, which exposes Kubernetes StatefulSet objects to users.
- Keep only a Deployment with ephemeral volumes and assume it assigns stable Pod identity after every restart.
- Upload the application’s startup script to Cloud Storage and let objects become Kubernetes Pods.
Explanation
Correct Answer
A:StatefulSets provide stable Pod identities, ordered lifecycle behavior and per-replica volume-claim patterns on a Kubernetes cluster. Choose compatible storage classes and verify data resilience separately.
Incorrect Answers
B:Cloud Run operates a managed service abstraction; it does not give the application a Kubernetes StatefulSet API and storage-controller semantics.
C:A general Deployment does not supply each replica with the same stable identity and claim pattern.
D:Object storage alone does not execute or orchestrate a stateful cluster workload.
Question 208
A private GKE cluster must download approved images from Artifact Registry but Pods show ImagePullBackOff due to missing credentials. What should be reviewed?
- Grant every workload the Organization Owner role, since image pulls require top-level IAM.
- Check Artifact Registry Reader access for the GKE node service account and repository connectivity/private DNS.
- Disable image authentication on the repository to permit anonymous public pulls.
- Replace the private registry with a local-only image name while keeping the image absent from nodes.
Explanation
Correct Answer
B:GKE typically pulls private Artifact Registry images using the node service account, separate from workload API identity. Verify repository-scoped read permission, image reference and network reachability so nodes can obtain the image.
Incorrect Answers
A:Organization-wide privilege is excessive, and image pulls require only an appropriate registry read permission.
C:Making an approved private repository publicly accessible violates access requirements and is unnecessary.
D:An image missing from both the registry and node cache cannot be launched by changing its name.
Question 209
A GKE Standard training workload requests one NVIDIA GPU, but all existing nodes use CPU-only machine types and the job remains pending. The needed accelerator is available in the selected zone and quota is sufficient. What cluster change is appropriate?
- Increase the Deployment replica count; a higher replica count installs GPU hardware into existing CPU-only nodes.
- Create a compatible GPU-enabled Standard node pool and schedule the Pod with nvidia.com/gpu resource limits and suitable accelerator placement.
- Change only the Pod's Kubernetes ServiceAccount; workload identity automatically supplies physical GPU capacity.
- Add a Cloud Run service revision; that causes the original GKE Standard node pools to receive accelerator devices.
Explanation
Correct Answer
B:Create a compatible GPU-enabled Standard node pool and schedule the Pod with nvidia.com/gpu resource limits and suitable accelerator placement. Google requires GPU-capable node pools with supported drivers/quota. The Pod needs a GPU resource limit so Kubernetes can place it on eligible accelerated nodes.
Incorrect Answers
A:Increase the Deployment replica count; a higher replica count installs GPU hardware into existing CPU-only nodes. Replica count creates additional Pods but does not change the hardware capabilities of existing nodes.
C:Change only the Pod's Kubernetes ServiceAccount; workload identity automatically supplies physical GPU capacity. Service account identity controls API authorization and cannot turn a CPU-only GKE node into a GPU node.
D:Add a Cloud Run service revision; that causes the original GKE Standard node pools to receive accelerator devices. Cloud Run is a different execution service. Deploying there does not install GPUs on the Standard cluster's CPU-only node pools.
Question 210
An administrator needs a list of all Pods across namespaces but only checks the default namespace. What command scope should they use?
- Run kubectl get pods in the default namespace and assume that is the entire cluster.
- Run kubectl get nodes because nodes and Pods are the same Kubernetes objects.
- Change every Pod to namespace default before listing them.
- Use kubectl get pods --all-namespaces after verifying the active context and read permissions.
Explanation
Correct Answer
D:The --all-namespaces flag includes namespaces within the current cluster for which the principal has the required access. Confirm the context first so results do not come from staging or another cluster.
Incorrect Answers
A:The default namespace view omits Pods in all other namespaces, even when they share the cluster.
B:Node inventory is not a list of running Pods across all namespaces.
C:Moving workloads changes their namespace isolation and is unnecessary for inventory.