hakk

software development, devops, and other drivel
Tree lined path

kubectl

Using a Kubernetes Configmap in a Pod

A ConfigMap is provided as a way to inject configuration data into a pod/pods. It can be included as files or be used as environment variables. Below are a couple of examples of mounting a configmap using both methods. Use as File In this first example I’ll show how to create a configmap and mount it using the key(s) as filenames and the data as the file content. It will then be used in an Nginx container as the index page. Read more...