LAB12a: More ConfigMap & Secret
LAB90a: More ConfigMap & Secrets
1. SECRET TYPES IN KUBERNETES
Type
Meaning
2. Why Values Are Base64?
✔ Binary-safe transport
✔ Consistent API formatting
✔ Avoid YAML parse issues
❓ What if you put plain text instead of base64?
3. DIFFERENT SECRET USE CASES
CASE 1 — TLS SECRET + SIMPLE NGINX POD
Step 1: Generate TLS cert
Step 2: Create the TLS Secret
Step 3: Nginx pod using TLS
Step 4: Custom Nginx conf (ConfigMap)
CASE 2 — DOCKER REGISTRY SECRET & PRIVATE IMAGE PULL
Step 1: Generate docker creds
Step 2: Create Kubernetes Docker Secret
Step 3: Use secret in a Pod
CASE 3 — SSH SECRET + POD RUNNING ANSIBLE PLAYBOOK
Step 1: Generate SSH key
Step 2: Create SSH Secret
Step 3: Create Ansible Playbook in ConfigMap
Step 4: Pod With ssh + ansible-runner
SUMMARY TABLE
Use Case
Secret Type
Why
Last updated