Courseiva

CKA Practice Question: Cluster Architecture, Installation and Configuration

You are performing a backup of etcd using the command: 'ETCDCTL_API=3 etcdctl snapshot save /backup/etcd-snapshot.db'. You get an error: 'Error: context deadline exceeded'. What is the most likely cause?

⚠ Common exam trap

Test-takers frequently assume the error is due to the cluster being down or a file lock, but the 'deadline exceeded' message specifically points to a network connectivity or endpoint misconfiguration issue, not a server-side unavailability or filesystem problem.

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

The endpoint flag is missing or incorrect, causing the client to timeout trying to connect

The error 'context deadline exceeded' indicates that the etcdctl client attempted to connect to the etcd endpoint but the request timed out before a connection could be established. This is most commonly caused by the --endpoints flag being omitted or pointing to an incorrect address (e.g., localhost:2379 instead of the actual etcd listener), so the client cannot reach the etcd server within the default timeout period.

Answer analysis

Option-by-option breakdown

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

  • The endpoint flag is missing or incorrect, causing the client to timeout trying to connect

    Why this is correct

    When etcdctl attempts to connect to the etcd cluster without a specified --endpoints flag, it defaults to localhost:2379. In many Kubernetes environments, etcd runs on a dedicated control plane node, often with a different IP address, or behind a firewall, or even on a non-standard port. If the client cannot establish a connection to the default or specified endpoint within the configured timeframe, the operation will result in a "context deadline exceeded" or similar timeout error, indicating that the server did not respond to the connection attempt. This is distinct from an active refusal.

  • The etcdctl version is incompatible with etcd

    Why it's wrong here

    An incompatibility between the etcdctl client version and the etcd server version would typically manifest as specific API errors or protocol version mismatch messages, not a generic connection timeout. For instance, etcdctl might explicitly state that the server's API version is not supported, or certain commands might fail with "unrecognized command" or "invalid argument" errors if the underlying RPCs have changed significantly. A timeout implies a failure to establish communication, not a failure in understanding the communication once established.

  • The etcd cluster is not running

    Why it's wrong here

    If the etcd cluster process were not running on the specified host and port, the operating system would immediately reject any incoming connection attempts to that port. This would result in a "connection refused" error, indicating that no service is listening on the target address. A "connection refused" error is an immediate response from the network stack, fundamentally different from a "timeout," which occurs when a connection attempt is made but no response is received within a specified duration.

  • The snapshot file already exists and is locked

    Why it's wrong here

    A snapshot file already existing and being locked would lead to a local filesystem error, not a network-related "context deadline exceeded" timeout. Such an error would typically be reported as "permission denied," "file in use," "resource busy," or "cannot create file" by the operating system when etcdctl attempts to write the snapshot. This type of error pertains to disk I/O and file management, completely unrelated to the client's ability to connect to the etcd server.

About these practice questions

This CKA question is part of Courseiva's 302-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

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.