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.
Your company is deploying a customer-facing frontend web service to a Google Kubernetes Engine (GKE) cluster. The frontend application is stateless, does not persist client session data locally, and requires five interchangeable replicas to satisfy user traffic demand.
The operations team requires that any future updates to the container image must be automated as a zero-downtime rolling update, with the ability to immediately roll back to a previous revision if defects are detected.
Which Kubernetes workload resource should you configure to manage these Pods?
A Kubernetes Deployment is a declarative workload controller designed specifically for managing stateless applications. It manages the desired state of an application, defining parameters such as container images, replica counts, labels, and update strategies. Under the hood, a Deployment creates and manages ReplicaSets, which in turn manage individual Pod lifecycles.
spec.replicas: 5, the Deployment controller continuously reconciles actual cluster state against the desired state, immediately creating replacements if any Pod crashes or a node fails.kubectl apply or kubectl set image), the Deployment automatically initiates a rolling update by spinning up a new ReplicaSet with updated Pods while progressively terminating older Pods according to configured surge and availability limits.kubectl rollout undo to instantly revert to a previous working revision if an update introduces defects.
maxSurge and maxUnavailable settings guarantee zero downtime during updates.kubectl scale) or automatically with the Horizontal Pod Autoscaler (HPA).Deployments represent the standard best practice for managing stateless container workloads in GKE. Unlike lower-level primitives like bare Pods or standalone ReplicaSets, Deployments automate update lifecycles and rollout management without manual intervention.
A ReplicaSet is a Kubernetes controller whose sole responsibility is to maintain a stable set of replica Pods running at any given time, ensuring that the number of Pods matching a label selector matches the specified count.
While a ReplicaSet can maintain the desired replica count of five Pods, it does not provide declarative, automated rolling update capabilities or rollout history management. If you update the Pod template image inside a standalone ReplicaSet, existing Pods continue running unmodified; new Pods are only created with the new image if existing ones are manually deleted. In contrast, a Deployment orchestrates multiple ReplicaSets to execute automated rolling updates and rollback rollouts seamlessly.
You were implementing a custom controller or custom orchestration tool that handles rollout logic independently and only requires Kubernetes to guarantee a fixed pool of identical worker Pods.
In modern Kubernetes and GKE administration, direct usage of standalone ReplicaSet manifests is strongly discouraged. Deployments are designed as the declarative management layer on top of ReplicaSets precisely to facilitate zero-downtime rolling updates.
A Kubernetes StatefulSet is a workload controller purpose-built for managing stateful applications that require unique network identities, ordered deployments, or persistent storage per instance.
The application described is strictly stateless and composed of interchangeable, uniform replicas. A StatefulSet introduces unnecessary operational complexity by assigning sticky, predictable identities (e.g., web-0, web-1), performing sequential, ordered scaling and updates, and dedicating individual storage volumes. Because the frontend Pods are completely interchangeable and store no local session state, the overhead and sequential rollout behavior of StatefulSets are counterproductive.
volumeClaimTemplates to maintain persistent disk attachment per ordinal index.The application were a distributed database (such as MongoDB, Cassandra, or PostgreSQL) or a clustered key-value store where each instance requires a stable network hostname, dedicated persistent disk attachment, and graceful, ordered deployment steps.
In GKE, stateful workloads rely on StatefulSets to prevent split-brain scenarios and data corruption. Stateless web services should avoid StatefulSets because they restrict Kubernetes from rapidly spinning up and destroying Pods as needed during dynamic load fluctuations.
A Pod is the smallest deployable computing unit in Kubernetes, representing a single instance of a running process consisting of one or more co-located containers with shared storage and network namespaces.
Standalone (or unmanaged) Pods lack an associated controller to supervise their lifecycle. If a standalone Pod crashes, experiences an out-of-memory error, or if its host node fails, Kubernetes does not automatically reschedule or recreate it. Furthermore, standalone Pods have no built-in mechanism to maintain a desired replica count, nor can they coordinate automated rolling updates or rollbacks across multiple instances when an image changes.
You were running a brief, one-off diagnostic utility, troubleshooting container behavior locally, or testing a temporary debugging container directly in a development environment.
Production workloads in GKE should virtually never be deployed as standalone Pods. Higher-level controllers like Deployments wrap Pod templates to provide fault tolerance, self-healing, and automated lifecycle operations.
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