Skip to content

Secrets and configmaps

Course: Kubernetes Part 2 - chapter 13

Kubernetes suggests some standard configuration practises.

These include things like

  1. You should always create a deployment rather than creating naked pods
  2. Write your configuration files using YAML rather than JSON
  3. Configuration files should be stored in version control before being pushed to the cluster

Kubernetes v1 API also gives you a way to store configuration of your application outside the image/pod

This is done using

  1. ConfigMaps
  2. Secrets

Don’t bake your application secrets in your docker image

Pass them in as environment variables whenever you’re starting the container