Kubernetes Secrets Management: Beginner's Guide
A beginner-level quiz on managing secrets in Kubernetes environments.
Questions in this quiz
15 questions on Kubernetes Secrets Management: Beginner's Guide. Work through them here, then start the quiz to answer them and see your score.
1.What is a Kubernetes Secret used for?
- AManaging pod replicas
- BStoring sensitive information like passwords
- CScheduling pods on nodes
- DConfiguring network policies
2.Which command is used to create a secret from a file in Kubernetes?
- Akubectl run
- Bkubectl create secret generic
- Ckubectl apply -f
- Dkubectl expose
3.How are secrets stored in Kubernetes by default?
- AHashed with SHA-256
- BEncrypted with AES
- CBase64 encoded
- DPlain text
4.Which API resource is used to define a secret in a YAML file?
- AConfigMap
- BSecret
- CDeployment
- DPod
5.What is the default namespace for secrets in Kubernetes?
- Adefault
- Bkube-secrets
- Ckube-system
- Dkube-public
6.Which of the following is a valid type for a Kubernetes Secret?
- AJSON
- BOpaque
- CYAML
- DXML
7.How can you view the details of a secret in Kubernetes?
- Akubectl logs <secret-name>
- Bkubectl describe secret <secret-name>
- Ckubectl get pods
- Dkubectl config view
8.What is the purpose of the 'data' field in a Kubernetes Secret?
- ATo store key-value pairs of secret data
- BTo define the secret's metadata
- CTo set the secret's labels
- DTo specify the secret's type
9.Which command would you use to delete a secret in Kubernetes?
- Akubectl delete secret <secret-name>
- Bkubectl remove secret <secret-name>
- Ckubectl erase secret <secret-name>
- Dkubectl destroy secret <secret-name>
10.Can a Kubernetes Secret be used in a Pod specification?
- ANo, secrets cannot be used in Pods
- BYes, by mounting it as a volume
- CYes, but only in Deployments
- DYes, but only in ConfigMaps
11.What is the maximum size of a Kubernetes Secret?
- A2 MB
- B256 KB
- C1 MB
- D512 KB
12.How can you update an existing secret in Kubernetes?
- Akubectl patch secret <secret-name>
- Bkubectl edit secret <secret-name>
- Ckubectl apply -f <file>
- Dkubectl update secret <secret-name>
13.What is the advantage of using Kubernetes Secrets over environment variables?
- ASecrets have unlimited size
- BSecrets are automatically encrypted
- CSecrets are easier to manage
- DSecrets are not exposed in the environment
14.Which of the following is NOT a valid way to use a Kubernetes Secret?
- AAs an environment variable
- BAs a volume in a Pod
- CAs a Docker image
- DAs a ConfigMap
15.What command lists all secrets in a Kubernetes namespace?
- Akubectl list secrets
- Bkubectl get secrets
- Ckubectl show secrets
- Dkubectl describe secrets