Fahad Ahammed’s Post

View profile for Fahad Ahammed, graphic

Cloud DevOps Architect | Terraform, AWS, CI/CD, Kubernetes Mastery | 7+ Years in Optimizing DevOps Workflows

🚀 Kubernetes Quick Tips: Environment Variables -- Choosing Between env and envFrom 🔹 When to use envFrom: Load multiple environment variables from ConfigMaps or Secrets in bulk. Perfect for reducing clutter when you have a lot of variables to import at once. Example: envFrom: - configMapRef:   name: my-configmap - secretRef:   name: my-secret 🔹 When to use env: For individual environment variables or more granular control. Ideal when pulling specific values from different sources like Secrets, ConfigMaps, or pod fields. Example: env: - name: APP_ENV  value: production - name: DATABASE_URL  valueFrom:   secretKeyRef:    name: my-secret    key: db-url 📌 Gist: Use envFrom for simplicity with large sets of variables, and env for precision when mixing multiple sources! #Kubernetes #DevOps #CloudNative #K8sTips #Containerization #ConfigMaps #Secrets #KubernetesTips

To view or add a comment, sign in

Explore topics