Try each one before opening the answer. Every option is explained, with the CNCF documentation page that proves it.
Question 1 · choose 1
The API server is restarted with this configuration:
apiVersion: apiserver.config.k8s.io/v1
kind: EncryptionConfiguration
resources:
- resources:
- secrets
providers:
- identity: {}
- aescbc:
keys:
- name: key1
secret: <base64-encoded 32-byte key>
How are Secrets that are created after the restart stored in etcd?
AEncrypted with aescbc, because identity is used only to read data that is already stored
BEncrypted with aescbc and also kept in plain text so that either provider can read them
CNot at all: the API server refuses to start because identity may not come before another provider
DIn plain text, because the first provider in the list is the one that encrypts new writes
Show the answer and why
AEncrypted with aescbc, because identity is used only to read data that is already stored
Incorrect
Providers are tried in order when reading, but writes always use the first provider, which here is identity.
BEncrypted with aescbc and also kept in plain text so that either provider can read them
Incorrect
Each write is stored once, with the first provider; there is no second copy in another format.
CNot at all: the API server refuses to start because identity may not come before another provider
Incorrect
identity may appear anywhere in the list; placing it first is the documented way to stop encrypting new writes.
DIn plain text, because the first provider in the list is the one that encrypts new writes
Correct
The first provider is used to encrypt resources written to storage; identity writes data as-is, so new Secrets are not encrypted.
In an EncryptionConfiguration the providers list is ordered: the first provider encrypts everything newly written, and the others are tried in order to decrypt. With identity first, new Secrets are written without encryption even though an aescbc key is configured.
A cluster encrypts Secrets at rest with an aesgcm key held in the EncryptionConfiguration file on each control plane host. A threat review assumes an attacker may gain read access to a control plane host's file system, not only to etcd. Which configuration, among those the current Kubernetes documentation recommends, keeps Secret data protected in that case?
AA KMS v1 provider, which also keeps the key outside the control plane hosts
BA KMS v2 provider, keeping the key encryption key in an external KMS
CKeep aesgcm and restrict the configuration file so only the kube-apiserver user can read it
DThe secretbox provider with a newly generated 32-byte key
Show the answer and why
AA KMS v1 provider, which also keeps the key outside the control plane hosts
Incorrect
KMS v1 is deprecated since Kubernetes v1.28 and disabled by default since v1.29; the documentation recommends KMS v2.
BA KMS v2 provider, keeping the key encryption key in an external KMS
Correct
With KMS envelope encryption the key encryption key is not stored in Kubernetes; recovering plain text requires compromising both etcd and the external KMS.
CKeep aesgcm and restrict the configuration file so only the kube-apiserver user can read it
Incorrect
The task asks for those permissions, but the key still sits in the file on the host; locally managed keys fail to protect against a host compromise, where an attacker can extract them from that file.
DThe secretbox provider with a newly generated 32-byte key
Incorrect
secretbox is another local provider: its key material is accessible from the control plane host, so a host compromise exposes it.
Locally managed keys protect against an etcd compromise but not a host compromise, because the keys live in the EncryptionConfiguration on the host; tighter file permissions do not change where the key is. A KMS provider uses envelope encryption with a key encryption key held outside Kubernetes, and v2 is the supported version, as v1 is deprecated and off by default.
A developer commits a Secret manifest with base64-encoded data to a shared Git repository, believing the encoding keeps the values safe. What do the Kubernetes Secret good practices say?
ABase64 is safe as long as the repository is private
BThe API server re-encrypts the values when the manifest is applied to the cluster
CBase64 data can be decoded only with the cluster's CA key
DBase64 is not encryption; anyone who reads the manifest has the secret
Show the answer and why
ABase64 is safe as long as the repository is private
Incorrect
Everyone who can read the repository can decode the values.
BThe API server re-encrypts the values when the manifest is applied to the cluster
Incorrect
Applying the manifest stores the data in the cluster; it does nothing for the copy in the repository.
CBase64 data can be decoded only with the cluster's CA key
Incorrect
Base64 is a reversible encoding that anyone can decode without any key.
DBase64 is not encryption; anyone who reads the manifest has the secret
Correct
The good practices warn against sharing Secret manifests: base64 encoding provides no additional confidentiality over plain text.
Base64 in Secret manifests is an encoding for transport, not protection. The Secret good practices tell developers not to share or commit such manifests, since anyone who reads them can recover the values.
Which Secret setting protects a Secret from accidental or unwanted updates that could cause application outages?
Atype: Opaque
BA readOnly volume mount
CAn annotation that lists the owning team
Dimmutable: true
Show the answer and why
Atype: Opaque
Incorrect
Opaque is the default type for arbitrary data; it does not prevent updates.
BA readOnly volume mount
Incorrect
Secret volumes are already read-only in the container; that does not stop updates through the API.
CAn annotation that lists the owning team
Incorrect
Annotations are metadata; they do not block changes.
Dimmutable: true
Correct
The Secret documentation describes immutable Secrets as protecting against accidental or unwanted updates, and they also reduce load on the API server.
Marking a Secret immutable means its data cannot be changed after creation; to change it, a new Secret must be created. This prevents accidental updates and lets the kubelet stop watching it.