Rules!

  1. Be fast, avoid creating yaml manually from scratch
  2. Use only kubernetes.io/docs for help.
  3. Check our solution after you did yours. You probably have a better one!

Todays Task: Pod with ServiceAccount uses Secrets

  1. Create new Namespace ns-secure and perform everything else in there
  2. Create ServiceAccount secret-manager
  3. Create Secret sec-a1 with any literal content of your choice
  4. Create Secret sec-a2 with any file content of your choice (like /etc/hosts)
  5. Create Pod secret-manager image nginx which uses the new SA
  6. Make Secret sec-a1 available as environment variable SEC_A1
  7. Mount Secret sec-a2 into the Pod read-only under /etc/sec-a2
  8. Verify your solution worked

.

.

.

.

.

Solution

To solve this we’re logged into our controlplane node cks-controlplane .

#kubernetes #security #certification #practice #devops

CKS Exam Series  Pods and Secrets
1.40 GEEK