Skip to content

Kustomize example with multiple environment variables

License

Notifications You must be signed in to change notification settings

L-U-C-K-Y/kustomize-with-multiple-envs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Kustomize with multiple environment variables

Kustomize example with multiple environment variables.

There are 3 examples in this repo:

  1. shared environment variables + separate overlay environment variables
  2. shared environment variables + overlay environment variables (as patch)
  3. shared environment variables + separate overlay environment variables from multiple files

1. overlays/dev

First example shows how to use shared environment variables from the base folder and separate environment variables from the overlay folder as config-map.

# Generate .yaml files
kustomize build ./overlays/dev

# Deploy
kustomize build ./overlays/dev | kubectl apply -f -

2. overlays/pre-prod

Second example shows how to combine/patch the shared env variables, by adding custom environment variables from the overlay folder as a config-map.

# Generate .yaml files
kustomize build ./overlays/pre-prod

# Deploy
kustomize build ./overlays/pre-prod | kubectl apply -f -

3. overlays/prod

Third example hows how to use shared/generic environment variables from the base folder and combine multiple environment variables from different files within an overlay folder as a config-map.

# Generate .yaml files
kustomize build ./overlays/prod

# Deploy
kustomize build ./overlays/prod | kubectl apply -f -

About

Kustomize example with multiple environment variables

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published