Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 932 Bytes

File metadata and controls

47 lines (32 loc) · 932 Bytes

Secrets

In the training, we will learn about Secrets.

Navigate to the folder 13_secret from CLI, before you get started.

Note that, there are errors in the yaml files. Try to fix them.

Inspect secret.yaml definition file and create the secret

cat secret.yaml
kubectl create -f secret.yaml

Inspect pod.yaml definition file and create the pod

cat pod.yaml
kubectl create -f pod.yaml

Verify everything works fine

kubectl exec -it my-pod -- cat /opt/my-volume/<FILENAME>

Output the secret value

kubectl get secret my-secret -o yaml

Convert the secret into human readable format

kubectl get secret my-secret -o jsonpath='{.data.foo}' | base64 -d

Cleanup

kubectl delete pod my-pod
kubectl delete secret my-secret

Jump to Home | Previous Training | Next Training