Skip to content

KCSA · Domain 2: Kubernetes Cluster Component Security · 22% of the exam

Task 2.8: Etcd

Protecting etcd: TLS between members and the API server, restricted network access, encryption at rest of Secret data, and backups.

Study it

Sample questions

Try each one before opening the answer. Every option is explained, with the CNCF documentation page that proves it.

Question 1 · choose 1

A self-managed etcd cluster has three members on separate hosts. Traffic from the API servers already uses TLS, but a packet capture shows replication traffic between the etcd members in clear text. According to the Kubernetes guide to operating etcd, which configuration secures that traffic?

  1. A--client-cert-auth and --trusted-ca-file on each member
  2. B--etcd-certfile and --etcd-keyfile on kube-apiserver for its etcd connections
  3. CAn EncryptionConfiguration with an aescbc provider on kube-apiserver
  4. D--peer-cert-file and --peer-key-file on each member, with https peer URLs
Show the answer and why
  • A--client-cert-auth and --trusted-ca-file on each member

    Incorrect

    These flags make etcd verify the certificates of clients that connect to it; they do not secure the replication traffic between members.

  • B--etcd-certfile and --etcd-keyfile on kube-apiserver for its etcd connections

    Incorrect

    These give the API server a client certificate for its own connections to etcd; they do not affect traffic among the members.

  • CAn EncryptionConfiguration with an aescbc provider on kube-apiserver

    Incorrect

    Encryption at rest encrypts selected resource data before it is stored; it does not turn member-to-member connections into TLS.

  • D--peer-cert-file and --peer-key-file on each member, with https peer URLs

    Correct

    The guide configures secure peer communication with --peer-key-file and --peer-cert-file and HTTPS as the URL scheme.

etcd secures two kinds of connections separately: peer traffic between members, with --peer-cert-file and --peer-key-file over https peer URLs, and client traffic, with the client certificate flags. A capture of clear-text replication points to missing peer TLS.

Question 2 · choose 1

How does the Kubernetes guide to operating etcd describe access to etcd?

  1. AAs read-only data that is safe to share with monitoring tools
  2. BAs limited by RBAC rules in the same way as API requests
  3. CAs harmless unless encryption at rest is turned off
  4. DAs equivalent to root permission in the cluster
Show the answer and why
  • AAs read-only data that is safe to share with monitoring tools

    Incorrect

    etcd holds the whole cluster state, and access to it is treated as root-equivalent.

  • BAs limited by RBAC rules in the same way as API requests

    Incorrect

    Direct etcd access does not pass through the API server's authorization.

  • CAs harmless unless encryption at rest is turned off

    Incorrect

    Encryption at rest protects selected data, but write access to etcd still controls the cluster.

  • DAs equivalent to root permission in the cluster

    Correct

    The guide says access to etcd is equivalent to root permission in the cluster, so ideally only the API server should have it.

etcd stores every object the API serves. The guide calls access to it equivalent to root in the cluster and recommends granting it only to the API servers and the nodes that need it.

Question 3 · choose 1

A team copies etcd backup files to a shared storage bucket that several departments can read. Why does the guide to securing a cluster treat those files as sensitive?

  1. Aetcd holds any information accessible through the API, Secrets included
  2. BBackups hold only node metrics, which would reveal the company's capacity plans
  3. CBackups contain the container images of every workload
  4. DBackups contain the kubelet's local logs
Show the answer and why
  • Aetcd holds any information accessible through the API, Secrets included

    Correct

    The guide says the etcd database contains any information accessible via the Kubernetes API, which may give an attacker significant visibility into the cluster.

  • BBackups hold only node metrics, which would reveal the company's capacity plans

    Incorrect

    etcd holds API objects, not node metrics.

  • CBackups contain the container images of every workload

    Incorrect

    Images live in registries and on nodes; etcd stores API objects.

  • DBackups contain the kubelet's local logs

    Incorrect

    Kubelet logs stay on the nodes; they are not stored in etcd.

An etcd backup is a copy of the cluster's API data, including Secrets and their values unless encryption at rest is configured. The guide notes that encryption means even someone with backup access cannot see the protected contents.

Practice domain 2 →Practice all domains →