0
0
Kubernetesdevops~5 mins

Secret types (Opaque, docker-registry, TLS) in Kubernetes - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is an Opaque secret in Kubernetes?
An Opaque secret is the default secret type in Kubernetes. It stores arbitrary user-defined data as key-value pairs, such as passwords or tokens, in base64 encoded form.
Click to reveal answer
beginner
What is the purpose of a docker-registry secret in Kubernetes?
A docker-registry secret stores credentials for accessing private container registries. It allows Kubernetes to pull private images securely using stored username, password, email, and server URL.
Click to reveal answer
beginner
What does a TLS secret contain in Kubernetes?
A TLS secret contains a private key and a certificate used for TLS encryption. It is commonly used to secure communication between clients and servers inside Kubernetes.
Click to reveal answer
intermediate
How do you create an Opaque secret using kubectl?
Use the command: <br>kubectl create secret generic my-secret --from-literal=key1=value1 --from-literal=key2=value2<br>This creates an Opaque secret named 'my-secret' with two key-value pairs.
Click to reveal answer
beginner
Which secret type would you use to store a TLS certificate and key?
You would use the TLS secret type because it is designed to hold a certificate and private key for secure communication.
Click to reveal answer
What is the default secret type in Kubernetes?
AServiceAccountToken
Bdocker-registry
CTLS
DOpaque
Which secret type is used to store Docker registry credentials?
Adocker-registry
BTLS
COpaque
DBasicAuth
What data does a TLS secret contain?
ACertificate and private key
BUsername and password
CAPI tokens
DConfig maps
How do you create an Opaque secret with literal values?
Akubectl create secret docker-registry
Bkubectl create secret generic --from-literal
Ckubectl create secret tls
Dkubectl create configmap
Which secret type is best for storing a private key and certificate for HTTPS?
AOpaque
Bdocker-registry
CTLS
DBasicAuth
Explain the differences between Opaque, docker-registry, and TLS secret types in Kubernetes.
Think about what kind of data each secret type holds and why.
You got /3 concepts.
    Describe how you would create and use a docker-registry secret to pull a private image.
    Focus on the command and how Kubernetes uses the secret.
    You got /3 concepts.