0
0
Kubernetesdevops~10 mins

Secret types (Opaque, docker-registry, TLS) in Kubernetes - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a generic secret with kubectl.

Kubernetes
kubectl create secret [1] mysecret --from-literal=username=admin
Drag options to blanks, or click blank then click option'
Adocker-registry
Bgeneric
Ctls
Dconfigmap
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker-registry' instead of 'generic' for generic secrets.
2fill in blank
medium

Complete the code to create a docker-registry secret with kubectl.

Kubernetes
kubectl create secret [1] regsecret --docker-username=user --docker-password=pass --docker-server=myregistry.com
Drag options to blanks, or click blank then click option'
Adocker-registry
Bopaque
Ctls
Dgeneric
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'generic' instead of 'docker-registry' for Docker credentials.
3fill in blank
hard

Fix the error in the command to create a TLS secret.

Kubernetes
kubectl create secret tls mytlssecret --cert=[1] --key=key.pem
Drag options to blanks, or click blank then click option'
Aca.crt
Btls.key
Ctls.crt
Dcert.pem
Attempts:
3 left
💡 Hint
Common Mistakes
Using the private key file for the --cert flag.
4fill in blank
hard

Fill both blanks to create a TLS secret with correct file names.

Kubernetes
kubectl create secret tls mytlssecret --cert=[1] --key=[2]
Drag options to blanks, or click blank then click option'
Acert.pem
Bkey.pem
Ctls.crt
Dtls.key
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping certificate and key file names.
5fill in blank
hard

Fill all three blanks to create an opaque secret with username and password.

Kubernetes
kubectl create secret [1] mysecret --from-literal=[2]=admin --from-literal=[3]=1234
Drag options to blanks, or click blank then click option'
Ageneric
Busername
Cpassword
Ddocker-registry
Attempts:
3 left
💡 Hint
Common Mistakes
Using docker-registry type for generic secrets.