Home / Companies / Spacelift / Blog / Post Details
Content Deep Dive

Kubernetes Environment Variables – Setting & Managing

Blog post from Spacelift

Post Details
Company
Date Published
Author
James Walker
Word Count
2,153
Language
English
Hacker News Points
-
Summary

Kubernetes environment variables are key-value pairs that provide configuration information to containers running in Kubernetes pods. They can be used to supply any external values that your containerized apps depend on, such as setting database connection and remote server credentials, identifying Pod details at runtime, customizing app config values, and using per-environment configuration. Environment variables are defined at the container level within your Kubernetes Pod manifests and can be set in the env and envFrom fields. They can also be populated from external sources like ConfigMaps and Secrets. It's important to use Secrets in conjunction with environment variables when working with sensitive information, as using the same environment variables across multiple applications in the same environment can lead to maintenance issues and potential exposure of sensitive information.