Add config maps to your namespaces

How to use manage Kubernetes Config Maps with Codefresh

Many applications require configuration with files, environment variables and command line arguments. It makes applications portable and easily manageable. It’s pretty easy to configure an application with this way. But it can become very hard to support tons of config files for different environments and hundreds of microservices.

Kubernetes provides an elegant and very convenient way for application configuration. This way is by using configuration maps. You can find more details about config maps at

You can manage all your cluster configuration using Codefresh. This article will explain you how to do it.

View existing config maps

In order to access the list of existing config maps, open the Kubernetes Services page and switch to list view.

Select a namespace and hover your mouse pointer on it. Click the gear button which appears at the end of the row. You will see a list of all config maps inside this namespace, including date of creation and number of configuration variables inside these maps.

Change View

Change View

Add a new config map

To add a new config map for the selected namespace, open the list of all config maps and click “Create a New Config Map” button.

Screen Shot 2017-10-08 at 9.10.15 AM.png

In the config map form that will open, enter a name, add variables and click the “Create” button.

Screen Shot 2017-10-08 at 9.10.22 AM.png

You can add variables to your config maps in several ways:

Add a single variable in config map

This is the easiest way to add a variable inside the config map (It’s very useful when you want to quickly create a small configmap with 1-2 variables inside):

  1. Enter key name
  2. Enter key value
  3. Click “ADD VARIABLE”

Screen Shot 2017-10-08 at 9.10.29 AM.png

Import variables from text / file

If you already have configuration variables inside a *.property file you can easily import it inside your configmap.

To import from text:

  2. Copy text from file and insert inside text area
  3. Click apply

Screen Shot 2017-10-08 at 9.10.39 AM.png

To import from file:

  2. Select file from your computer and click open button

Copy from existing config map

You can easily copy a previously created config map file and use it in other namespaces using the following steps:

  2. Select cluster and namespace which contains configmap that you want to copy
  3. Find this configmap inside the list and click “SELECT” button

Screen Shot 2017-10-08 at 9.11.03 AM.png

Edit / remove config maps

You can easily edit / remove variables for each of your config maps.

  1. Select a config map
  2. Click on pencil icon
  3. You can add new variables using the same instructions as in “add new config map” section

Screen Shot 2017-10-08 at 9.22.27 AM.png

To remove a config map, click on “remove” icon in the selected row. After your confirmation, the configmap will be removed.