Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Associate Cloud Engineer practice bank has an additional 2,014 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
You are preparing to deploy a stateless containerized web application to a Google Kubernetes Engine (GKE) cluster. Your workload must meet the following operational requirements:
app: web-frontend so that workload controllers and services can target the pods200m CPU per containerHow should you configure and deploy this workload?
Job manifest with spec.parallelism: 3 and container resource limits, then execute kubectl autoscale job web-store --min=3 --max=3 to manage pod count.A Kubernetes Job (kind: Job) is a controller object designed for batch processing and short-lived tasks. A Job creates one or more pods and ensures that a specified number of them successfully terminate upon completing their execution.
kubectl autoscale command creates a Horizontal Pod Autoscaler (HPA) targeting scalable controllers like Deployments or ReplicaSets, not batch Jobs.kubectl autoscale command with static bounds (--min=3 --max=3) defeats the purpose of maintaining a clean declarative manifest for desired replica states.You needed to run parallel batch computation tasks (such as image rendering, batch database migrations, or report generation) where three worker pods process items until the job is complete.
Pod manifest that defines three identical container entries under the spec.containers list, each with resources.requests.cpu: 200m, then run kubectl apply -f pod.yaml.A single Pod manifest defining multiple entries in its containers array creates a multi-container Pod (such as a sidecar or proxy pattern). All containers inside that single pod are co-located and scheduled together on the exact same worker node, sharing the pod's network namespace and storage volumes.
You needed to deploy a primary application container alongside two supporting sidecar proxy or log-forwarding containers that must share the same localhost network interface and storage volume on a single node.
StatefulSet manifest without defining label selectors, set spec.replicas: 1, and then execute the imperative command kubectl scale statefulset web-frontend --replicas=3.A StatefulSet (kind: StatefulSet) is a Kubernetes controller used to manage stateful applications that require unique, stable network identities, persistent ordered scaling, and dedicated persistent storage per pod (e.g., distributed databases like Cassandra or ZooKeeper).
pod-0, pod-1), ordered deployments, or dedicated persistent volume claims, making StatefulSet an unnecessary and inefficient controller choice.spec.selector that matches spec.template.metadata.labels; omitting selectors causes the API server to reject the manifest.kubectl scale diverges from the declared configuration in the manifest file, leading to configuration drift when manifests are reapplied.You were deploying a distributed database cluster where each pod instance required dedicated persistent storage, a consistent ordinal index, and strict startup ordering.
Deployment manifest specifying spec.replicas: 3, matching labels under spec.selector.matchLabels and spec.template.metadata.labels, and resources.requests.cpu: 200m in the container spec, then run kubectl apply -f deployment.yaml.A Kubernetes Deployment is a declarative controller resource (apiVersion: apps/v1, kind: Deployment) used to manage stateless containerized workloads. It automates the lifecycle of ReplicaSets and individual Pods, ensuring the cluster maintains the specified desired state, handles zero-downtime rolling updates, and automatically replaces unhealthy pod instances.
spec.replicas: 3): Setting the replicas field in the Deployment spec ensures that the controller continuously maintains exactly three running pod replicas.app: web-frontend): The spec.selector.matchLabels block instructs the Deployment controller which pods to manage, corresponding directly to the labels defined in the pod template metadata (spec.template.metadata.labels).resources.requests.cpu: 200m): Declaring requests under the container configuration ensures the Kubernetes scheduler places pods on nodes with at least 200 millicores of available CPU capacity.kubectl apply -f): Applying the YAML manifest using kubectl apply submits the desired state to the Kubernetes API server, creating the resource if it does not exist or updating it declaratively.Using a Deployment resource combined with kubectl apply is the foundational best practice for managing stateless applications in GKE. It couples desired state replication, resource reservations, and label selection within a single declarative configuration file.

Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated