Courseiva
Container Orchestration →mediumMultiple Choice

KCNA Container Orchestration Practice Question

A developer wants to deploy a stateful application that requires stable network identities and persistent storage. Which Kubernetes resource is best suited for this workload?

⚠ Common exam trap

CNCF often tests the misconception that Deployment can handle stateful workloads because it supports PersistentVolumeClaims, but the trap is that Deployment does not guarantee stable network identities or ordered Pod management, which are critical for stateful applications like databases.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

StatefulSet

StatefulSet is the correct choice because it is designed specifically for stateful applications that require stable, unique network identities (via headless Services and ordinal hostnames) and persistent storage (via PersistentVolumeClaims that are retained across Pod rescheduling). Unlike Deployments, StatefulSets guarantee ordered deployment, scaling, and termination, which is essential for databases or message queues.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Deployment

    Why it's wrong here

    A Deployment manages stateless replicas with random pod names and no per-pod PersistentVolumeClaim binding, so it cannot deliver stable identities. It is tempting because Deployments suit scalable, interchangeable web services; StatefulSet is required when each replica needs its own stable hostname and storage.

  • ✗

    DaemonSet

    Why it's wrong here

    A DaemonSet schedules one pod per node for node-level agents, giving no stable per-pod network identity or dedicated PersistentVolumeClaim. It is tempting because DaemonSets guarantee coverage across every node; StatefulSet is required when each replica needs its own ordinal identity and persistent volume.

  • ✓

    StatefulSet

    Why this is correct

    StatefulSets give each pod a stable ordinal hostname and its own PersistentVolumeClaim via volumeClaimTemplates, so identity and storage survive rescheduling. Deployments provide neither, as pods are interchangeable with random names and typically share or lose storage.

  • ✗

    Job

    Why it's wrong here

    A Job runs pods to completion for batch tasks, so pods terminate and carry no stable identity or persistent storage binding. It is tempting because Jobs suit finite, run-once workloads; StatefulSet is required when replicas must retain ordinal hostnames and their own PersistentVolumeClaims across restarts.

About these practice questions

This KCNA question is part of Courseiva's 930-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

2 more ways this is tested on KCNA

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A developer wants to deploy a stateful application that requires stable network identities and persistent storage per pod instance. Which Kubernetes resource is most appropriate?

medium
  • A.DaemonSet
  • B.Job
  • C.Deployment
  • ✓ D.StatefulSet

Why D: StatefulSet is the correct choice because it is specifically designed for stateful applications that require stable, unique network identities (via headless Services and ordinal hostnames) and persistent storage per pod instance (via PersistentVolumeClaims that are not shared across replicas). Unlike Deployments, StatefulSet maintains a sticky identity for each pod, ensuring that on rescheduling, the pod retains its name, network identity, and bound storage.

Variation 2. A DevOps engineer wants to deploy a stateful application that requires stable network identities and persistent storage. Which Kubernetes resource is most appropriate?

medium
  • A.DaemonSet
  • ✓ B.StatefulSet
  • C.Deployment
  • D.ReplicaSet

Why B: StatefulSet is the correct choice because it is designed specifically for stateful applications that require stable, unique network identities (via headless Services and ordinal hostnames) and persistent storage (via PersistentVolumeClaims that persist across Pod rescheduling). Unlike Deployments, StatefulSet guarantees ordered, graceful deployment and scaling, which is essential for applications like databases or distributed systems that rely on stable identities.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This KCNA practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the KCNA exam.