CKA Practice Question: Cluster Architecture, Installation and Configuration
You need to back up etcd data for a cluster running Kubernetes v1.29. Which command correctly creates a snapshot?
⚠ Common exam trap
Many exam-takers confuse the deprecated etcd v2 API (which uses `etcdctl backup`) with the v3 API (which uses `etcdctl snapshot save`), and they may forget to set `ETCDCTL_API=3` or incorrectly assume `kubectl` can manage etcd snapshots.
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
✓
ETCDCTL_API=3 etcdctl snapshot save /backup/snapshot.db
Etcd v3 is the default and supported version in Kubernetes v1.29, and the `ETCDCTL_API=3` environment variable ensures the etcdctl client uses the v3 API, which provides the `snapshot save` command for creating consistent backups. The command `ETCDCTL_API=3 etcdctl snapshot save /backup/snapshot.db` correctly captures a point-in-time snapshot of the etcd data store, which is essential for disaster recovery.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
kubectl etcd snapshot save /backup/snapshot.db
Why it's wrong here
kubectl is the Kubernetes command-line tool used to interact with the Kubernetes API server, not the underlying etcd database directly. It does not possess an etcd subcommand or plugin by default to perform database-level operations like snapshots. To interact with etcd, you must use the dedicated etcdctl CLI tool with appropriate certificates.
- ✗
etcdctl backup /backup/snapshot.db
Why it's wrong here
While older versions of etcd supported a backup command, modern etcd v3 deployments do not recognize backup as a valid subcommand. Instead, the snapshot save command must be used to create a consistent point-in-time backup of the keyspace. Attempting to run etcdctl backup will result in a command-not-found or syntax error.
- ✗
ETCDCTL_API=2 etcdctl snapshot save /backup/snapshot.db
Why it's wrong here
Setting the environment variable ETCDCTL_API=2 forces the client to use the legacy v2 API protocol, which does not support the snapshot save command. The snapshot functionality is exclusive to the v3 API, which handles the storage engine differently. Using API version 2 for this command will result in an unrecognized command error.
- ✓
ETCDCTL_API=3 etcdctl snapshot save /backup/snapshot.db
Why this is correct
This is the correct command because it explicitly sets the API version to 3 using the ETCDCTL_API=3 environment variable, which is required to access the modern etcd v3 storage engine features. The snapshot save subcommand is the standard, officially supported method to generate a consistent, non-disruptive backup of the cluster's state.
Go deeper
Related to this question
Learn chapter
Kubernetes Architecture Overview
Key term
Ingress Resources
Ingress Resources are Kubernetes API objects that manage external access to services inside a cluster, typically HTTP and HTTPS traffic, by defining rules for routing requests based on hostnames and paths.
Key term
Network Policies
A Kubernetes resource that controls how pods communicate with each other and with other network endpoints, acting as a firewall for pod-to-pod traffic.
About these practice questions
This CKA question is part of Courseiva's 726-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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CKA 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 CKA exam.