Which workload is the strongest fit for a StatefulSet rather than a typical stateless Deployment?
Kubernetes StatefulSets and Persistent Storage Online Quiz Questions
Use this free practice quiz with 10 questions to review Kubernetes StatefulSets and Persistent Storage, test your knowledge, and prepare for your next test or exam.
Which option correctly describes the roles of a PersistentVolume (PV), PersistentVolumeClaim (PVC), and StorageClass?
- A
A PV requests storage, a PVC represents available cluster storage, and a StorageClass mounts the volume in a container.
- B
A PV describes a storage type, a PVC provisions a Pod, and a StorageClass represents available cluster storage.
- C
A PV represents storage available to the cluster, a PVC requests storage, and a StorageClass describes a storage type and provisioner.
- D
A PV mounts storage into a container, a PVC describes its provisioner, and a StorageClass requests storage.
An application must retain data when its container is removed and recreated. Which storage choice best meets that need?
- A
Use a volume whose lifecycle can be separate from the container’s.
- B
Write the data only to the container’s writable layer.
- C
Keep the data only in a cache that can be rebuilt.
- D
Assume restarting the container turns its writable layer into persistent storage.
A team is selecting storage for a database. Which approach best reflects the relevant storage design considerations?
- A
Choose based only on capacity, since the application’s access pattern does not affect storage needs.
- B
Choose based only on whether the volume can be mounted; application recovery and security are unrelated.
- C
Use the same storage configuration for all workloads because storage requirements do not depend on workload type.
- D
Assess factors such as performance, recovery, access and sharing, lifecycle and cost, and security against the application’s needs.
A team wants a dynamically provisioned PV to remain for manual handling after its claim is released. Which reclaim policy should it choose?
- A
Delete, which can remove the underlying volume - B
Retain, which leaves the volume for manual handling - C
ReadWriteOnce, which preserves a volume after its claim is released - D
A Pod restart policy, which determines whether the PV is removed
When may a Deployment with a PVC be sufficient instead of a StatefulSet?
- A
A single instance needs a PVC but does not need stable per-replica identity or ordered operations.
- B
Each replica needs a stable identity and its own persistent storage.
- C
The application requires ordered deployment and scaling.
- D
The replicas must not be interchangeable and each must keep its own identity.
An application has a cache that can be rebuilt after a container replacement. Which storage choice may be appropriate for this temporary data?
- A
Use a bind mount for every cache, because a cache must be stored at a chosen host path.
- B
Store it only in the container’s writable layer so it persists after container removal.
- C
Use ephemeral storage if the cache can be rebuilt.
- D
Use a named volume because all volumes are backups.
A team uses a StatefulSet and persistent storage for a database. What else is needed to provide high availability?
- A
A StatefulSet automatically provides application replication and failover.
- B
A persistent volume automatically protects against storage-system failure and accidental deletion.
- C
Keeping a Pod’s identity associated with its claim is sufficient to make the application highly available.
- D
Design application-level replication, failover, and recovery; persistence alone does not make the application highly available.
What does the Kubernetes access mode ReadWriteOnce mean?
- A
Only one Pod in the cluster may use the volume, and it must be the only Pod on its node.
- B
The volume may be mounted read-write by a single node; multiple Pods on that same node may still use it.
- C
Any number of nodes may mount the volume read-write, regardless of provider support.
- D
The mode guarantees application-level locking and replication between Pods.
How can a StatefulSet help preserve the relationship between a Pod identity and its storage when that Pod is rescheduled?
- A
It stores all replica data in the container writable layer so that Pods remain interchangeable.
- B
It creates one shared PVC for all Pods and guarantees storage availability during any failure.
- C
It can create a separate PVC for each Pod and associate a rescheduled Pod identity with its existing claim, subject to system constraints.
- D
It guarantees application replication and failover whenever a Pod is rescheduled.
Related study packs and tools
AWS Cloud Concepts
Practice cloud benefits, deployment models, scalability, elasticity and AWS Cloud concepts.
12 study toolsAWS Cloud Practitioner Practice Test
Comprehensive AWS Certified Cloud Practitioner practice covering cloud concepts, security, AWS services and pricing.
15 study toolsAWS Cloud Technology and Services: Cloud Databases
Focused study of relational and nonrelational databases and service selection concepts.
12 study toolsAWS Cloud Technology and Services: EC2 Compute
Focused study of instances, instance types, scaling and compute use cases.
12 study toolsAWS Cloud Technology and Services: S3 Storage
Focused study of objects, buckets, storage classes and storage use cases.
12 study toolsAWS Cloud Technology and Services: Serverless Services
Focused study of event-driven functions and serverless application concepts.
15 study tools