Kubernetes Secrets Management: A Beginner's Guide to Secure Deployments
Learn the basics of managing secrets in Kubernetes for secure application deployments.
Questions in this quiz
15 questions on Kubernetes Secrets Management: A Beginner's Guide to Secure Deployments. Work through them here, then start the quiz to answer them and see your score.
1.What is a Kubernetes Secret used for?
- AManaging network policies
- BScaling applications
- CStoring sensitive information like passwords
- DDeploying applications
2.Which command is used to create a Secret from a literal value?
- Akubectl run
- Bkubectl apply -f
- Ckubectl create secret generic
- Dkubectl expose
3.How can you reference a Secret in a Pod?
- AUsing a ConfigMap
- BUsing a Deployment
- CUsing a Secret volume
- DUsing a Service
4.What is the default encoding for data stored in a Kubernetes Secret?
- AASCII
- BHexadecimal
- CBase64
- DUTF-8
5.Which of the following is NOT a type of Kubernetes Secret?
- ANetworkPolicy
- BDockerConfigJson
- CTLS
- DOpaque
6.How can you update an existing Secret in Kubernetes?
- Akubectl restart secret
- Bkubectl delete secret
- Ckubectl update secret
- Dkubectl edit secret
7.What is the purpose of the 'type' field in a Secret?
- ATo categorize the Secret's data
- BTo define the Secret's scope
- CTo specify the encoding
- DTo set the Secret's permissions
8.Which Kubernetes object can use a Secret to pull an image from a private Docker registry?
- APod
- BService
- CIngress
- DConfigMap
9.What command lists all Secrets in a Kubernetes namespace?
- Akubectl list secrets
- Bkubectl show secrets
- Ckubectl get secrets
- Dkubectl describe secrets
10.How is a Secret mounted as a volume in a Pod?
- ABy adding it to the environment variables
- BBy specifying it in the volumeMounts section
- CBy defining it in the Pod's annotations
- DBy including it in the Pod's labels
11.What is the advantage of using Secrets over ConfigMaps for sensitive data?
- ASecrets are automatically versioned
- BSecrets are encrypted by default
- CSecrets are easier to manage
- DSecrets can store larger data
12.Which field in a Pod's spec is used to specify a Secret as an environment variable?
- Avolumes
- BinitContainers
- CenvFrom
- Dlabels
13.Can a Secret be used across multiple namespaces in Kubernetes?
- AYes, by default
- BNo, Secrets are namespace-scoped
- CYes, if configured with a ClusterRole
- DNo, unless using a NetworkPolicy
14.What is the maximum size of a Kubernetes Secret?
- A512 KB
- B1 MB
- C256 KB
- D2 MB
15.Which command is used to delete a Secret in Kubernetes?
- Akubectl destroy secret
- Bkubectl delete secret
- Ckubectl erase secret
- Dkubectl remove secret