Courseiva

CKS Minimize Microservice Vulnerabilities Practice Question

Which TWO of the following are required to enable encryption of Kubernetes Secrets at rest?

⚠ Common exam trap

The CNCF CKS exam often tests the misconception that encryption at rest is enabled via a feature gate or etcdctl, when in fact it requires creating an EncryptionConfiguration resource and passing it via the --encryption-provider-config flag to the kube-apiserver.

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

✓

Create an EncryptionConfiguration resource

Option B is correct because enabling encryption at rest for Kubernetes Secrets requires creating an EncryptionConfiguration resource, a YAML file that defines the encryption providers (such as aescbc, aesgcm, or secretbox) and their key material used to encrypt resources like secrets in etcd. Option D is correct because the kube-apiserver must be started with the --encryption-provider-config flag pointing to that EncryptionConfiguration file; without this flag the API server ignores the configuration and writes Secrets to etcd in plaintext. Option A is incorrect because etcdctl is only an administrative CLI for interacting with etcd (for example, verifying that stored values are prefixed with k8s:enc:), not a mechanism for configuring encryption. Option C is incorrect because EncryptionAtRest is not a feature gate that must be enabled; the feature is controlled entirely by the --encryption-provider-config flag and the EncryptionConfiguration resource, so no such --feature-gates flag exists or is needed.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Configure etcd encryption via etcdctl

    Why it's wrong here

    etcdctl cannot configure encryption; the API server performs encryption before writing to etcd, using keys from the EncryptionConfiguration file. Configuring etcd directly is tempting because etcd stores the Secrets, yet etcd's own mechanisms do not provide this at-rest encryption.

  • ✓

    Create an EncryptionConfiguration resource

    Why this is correct

    The EncryptionConfiguration manifest defines which resources are encrypted and names the provider (for example aescbc or kms). The API server reads this file to know what to encrypt, making its creation a prerequisite before any flag can reference it.

  • ✗

    Enable the --feature-gates=EncryptionAtRest=true flag on the API server

    Why it's wrong here

    Encryption at rest is configured through the EncryptionConfiguration resource passed to the API server via --encryption-provider-config; no EncryptionAtRest feature gate exists. The flag is tempting because feature gates do toggle other API server capabilities, but this setting never required one.

  • ✓

    Pass the --encryption-provider-config flag to the kube-apiserver

    Why this is correct

    Passing `--encryption-provider-config` to the kube-apiserver activates the EncryptionConfiguration resource, which defines the providers (such as `aescbc` or `kms`) and key material used to encrypt Secret objects before they are written to etcd. Without this flag, the API server stores Secrets as plaintext, so it directly satisfies the at-rest encryption requirement.

About these practice questions

Courseiva writes every CKS question from scratch — 845 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on CKS

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. You need to encrypt Kubernetes secrets at rest. Which resource should you configure?

medium
  • A.EncryptionProvider
  • B.SecretEncryptionConfig
  • C.KMSProvider
  • ✓ D.EncryptionConfiguration

Why D: Kubernetes uses an `EncryptionConfiguration` object to configure encryption at rest for secrets and other resources in etcd. This YAML-based resource defines which providers (e.g., `aescbc`, `kms`, `secretbox`) are used to encrypt data before it is written to the underlying storage. The API server reads this configuration from a file specified via the `--encryption-provider-config` flag, enabling transparent encryption and decryption of resource data.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CKS 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 CKS exam.