appsettings.json to Kubernetes env YAML
Convert appsettings.json to a Kubernetes container env list. Generate quoted name/value YAML for nested .NET settings, entirely in your browser.
Add the env list to a Kubernetes container
Place the generated env list inside the container definition, such as spec.template.spec.containers in a Deployment. Each value is a quoted string and nested settings use double underscores. This output contains literal values, not Secret references. Use secretKeyRef for credentials rather than committing them to a manifest.
ENV → JSON detects the pasted format automatically. You can paste another supported format without changing this selection.
How .NET maps settings to environment variables
Logging__LogLevel__Default
Sections
Every level of nesting becomes a double underscore, because a colon does not work in environment variable names on every platform.
Cors__Origins__0
Arrays
Each item of an array gets its position as a key, starting at 0.
LOGGING__LOGLEVEL__DEFAULT
Overrides
.NET reads environment variables after appsettings.json, so they replace its values. Names are not case sensitive.
MYAPP_Jwt__Issuer
Prefix
With AddEnvironmentVariables("MYAPP_"), .NET reads only the variables that start with the prefix and drops the prefix from the name.