Kubernetes Security & Hardening›Practice: Vault, egress and tenant labs · Cheat sheet & self-check

Practice: Vault, egress and tenant labs · wrap-up

Cheat sheet & self-check

22 questions across 5 lessons. Each answer links back to the lesson it came from.

Pick an answer to see if you got it, and why.

  1. Q1. How does Vault check that a pod's ServiceAccount token is real?

    Show answer

    B. The kubernetes auth method sends the token to TokenReview, using a reviewer token or the client's own token. The jwt method checks it offline against the cluster's JWKS.

    From lesson 16 · Vault on Kubernetes: login, delivery and rotation
  2. Q2. Which delivery pattern stores the secret in etcd?

    Show answer

    C. VSO copies Vault data into normal Kubernetes Secrets, so etcd encryption at rest becomes mandatory. The injector and CSI keep secrets out of etcd.

    From lesson 16 · Vault on Kubernetes: login, delivery and rotation
  3. Q3. What does 'vault kv put' do to fields you leave out?

    Show answer

    B. Use 'vault kv patch' to change one field. Use -cas so two writers can't overwrite each other.

    From lesson 16 · Vault on Kubernetes: login, delivery and rotation
  4. Q4. Why set audience=vault on the Vault role?

    Show answer

    B. Audience binding stops a token made for something else (another API, the Kubernetes API) from being replayed against Vault.

    From lesson 16 · Vault on Kubernetes: login, delivery and rotation
  5. Q5. Why enable two audit devices?

    Show answer

    B. Vault fails closed on audit. A second device keeps it serving when one destination is down.

    From lesson 16 · Vault on Kubernetes: login, delivery and rotation
  6. Q6. Why can't a standard NetworkPolicy block internet access for the whole cluster?

    Show answer

    B. Standard policies are namespaced and allow-only. A cluster-wide deny needs the CNI's own policy type.

    From lesson 17 · Blocking internet egress by pod label
  7. Q7. In Calico, what does a separate tier give you?

    Show answer

    B. Tiers are evaluated in order. A Deny in the platform tier ends the decision; a Pass hands private traffic down to the namespace policies.

    From lesson 17 · Blocking internet egress by pod label
  8. Q8. What's the main way a team could get around a label-based egress rule?

    Show answer

    B. Whoever can edit the Deployment can set the label. Guard it with Kyverno or ValidatingAdmissionPolicy.

    From lesson 17 · Blocking internet egress by pod label
  9. Q9. Which traffic is NOT controlled by these pod policies?

    Show answer

    B. Pod policies select pod endpoints. Host-network pods and node traffic need host or cloud firewall rules.

    From lesson 17 · Blocking internet egress by pod label
  10. Q10. alice has 'admin' in acme-dev. Why can't she bind cluster-admin there?

    Show answer

    B. RBAC checks the binder's own permissions. alice holds everything in 'edit' inside acme-dev, so she may bind edit, but not cluster-admin.

    From lesson 18 · Lab: attack your own tenant setup
  11. Q11. bob has no 'get secrets' but can create pods. What can he do?

    Show answer

    B. Pod creation lets you choose volumes and serviceAccountName. It equals Secret access in that namespace.

    From lesson 18 · Lab: attack your own tenant setup
  12. Q12. A Deployment shows 0 ready and its pods have no events. Where do you look?

    Show answer

    B. The pods were never created. Quota, LimitRange, Pod Security and webhooks all reject at pod creation, which the ReplicaSet reports.

    From lesson 18 · Lab: attack your own tenant setup
  13. Q13. What does 'kubectl auth can-i ... --as=bob' test if you leave out --as-group?

    Show answer

    B. Impersonation doesn't look up groups. Pass --as-group, or test with the user's real credentials.

    From lesson 18 · Lab: attack your own tenant setup
  14. Q14. Can resourceNames limit which objects someone may list?

    Show answer

    B. A plain list is refused; list/watch with --field-selector metadata.name=<name> is allowed for that one name. create can't be limited by name.

    From lesson 18 · Lab: attack your own tenant setup
  15. Q15. Which file must never leave the developer's laptop?

    Show answer

    C. The private key proves identity. The CSR, the signed certificate and the CA certificate are all public.

    From lesson 19 · Lab: a developer's own kubeconfig, key never shared
  16. Q16. Why does 'kubectl get nodes' fail for a developer with 'edit' in their namespace?

    Show answer

    B. Add a ClusterRole for nodes and bind it with a ClusterRoleBinding.

    From lesson 19 · Lab: a developer's own kubeconfig, key never shared
  17. Q17. Why must you read a CSR's subject before approving it?

    Show answer

    B. The approver vouches for the names in the request. Keep CSR approval rights for very few people.

    From lesson 19 · Lab: a developer's own kubeconfig, key never shared
  18. Q18. A new teammate joins the group. What RBAC change is needed?

    Show answer

    B. Binding groups instead of users makes onboarding a certificate issue, not an RBAC change.

    From lesson 19 · Lab: a developer's own kubeconfig, key never shared
  19. Q19. The API server returns 403. What does that mean?

    Show answer

    B. 401 = unknown identity; 403 = known identity, not allowed.

    From lesson 20 · Knowledge check: Kubernetes security
  20. Q20. Which RBAC combination reuses one set of rules inside a single namespace?

    Show answer

    B. A RoleBinding that points to a ClusterRole applies those rules only in the binding's namespace.

    From lesson 20 · Knowledge check: Kubernetes security
  21. Q21. What does an image signature prove?

    Show answer

    B. Signing is about integrity and origin, not quality or safety.

    From lesson 20 · Knowledge check: Kubernetes security
  22. Q22. Which audit level fits Secrets?

    Show answer

    B. Metadata records who, what and when without logging the secret value.

    From lesson 20 · Knowledge check: Kubernetes security