Questions tagged [configmap]

ConfigMaps allow you to decouple configuration artifacts from image content to keep containerized applications portable.

ConfigMaps bind configuration files, command-line arguments, environment variables, port numbers, and other configuration artifacts to your Pods' containers and system components at runtime. ConfigMaps allow you to separate your configurations from your Pods and components, which helps keep your workloads portable, makes their configurations easier to change and manage, and prevents hardcoding configuration data to Pod specifications.

ConfigMaps are useful for storing and sharing non-sensitive, unencrypted configuration information. To use sensitive information in your clusters, you must use Secrets.

Documentations

503 questions
4
votes
1 answer

Kubernetes - update existing configmap from file

I created a simple text file on my local machine I created a configmap out of that test file: kubectl create configmap test-configm --from-file=test-file.txt I added the volumemounts and volume to my deployment and verified the file is in my…
johnb928
  • 53
  • 1
  • 5
4
votes
2 answers

<.Chart.name>: can't evaluate field name in type interface {}

When you deploy the chart you get the following error: <.Chart.name>: can't evaluate field name in type interface {}
Tudor
  • 2,224
  • 2
  • 21
  • 24
4
votes
1 answer

How to run shell script using CronJobs in Kubernetes?

I am trying to run a shell script at regular interval of 1 minute using a CronJob. I have created following Cron job in my openshift template: - kind: CronJob apiVersion: batch/v2alpha1 metadata: name: "${APPLICATION_NAME}" spec: …
Harshit Goel
  • 175
  • 1
  • 3
  • 13
4
votes
1 answer

Use an environment variable as integer in yaml file

I have an application in a container which reads a YAML file which contains data like initializationCount=0 port=980 Now that I want to remove those hard coded values inside the application and get them out of the…
Bhargav Behara
  • 285
  • 1
  • 4
  • 10
4
votes
1 answer

Figure out where ConfigMap values are used in the cluster

In my team we have a single huge ConfigMap Resource that holds all the important variables distributed to all our pods. After some time we realized that it is very hard to follow up where those variables are finally used. I was wondering if there is…
xetra11
  • 7,671
  • 14
  • 84
  • 159
4
votes
1 answer

How to Merge the contents of ConfigMaps in Kubernetes

We have our app specific properties specified in the below files application.properties application-dev.properties application-qa.properties While creating a configmap in kubernetes, I wanted to merge the contents into one single file. Is it…
Sunil Gajula
  • 1,117
  • 2
  • 14
  • 30
4
votes
2 answers

How to mount a ConfigMap as a file without using volume

The aim behind this question is to know how having a file inside a Pod, if we use ConfigMap, I don't want to apply changes if the configMap will change Thanks
Smaillns
  • 2,540
  • 1
  • 28
  • 40
4
votes
2 answers

How can I change user of configmap data?

I create image running with non-root user but when I use configmap for volume ,files came with volume are root user. I want to change user but I don't know how to change of user. I search from google and stackoverflow but I find nothing about it. …
O.Kaplan
  • 59
  • 1
  • 5
4
votes
1 answer

Is it possible to create a configmap with an empty/blank key? If yes, what should be the expected behaviour with respect to the pods?

Want to understand if it's possible to create a configmap with a blank or empty key. The value isn't empty though.
Vinodh Nagarajaiah
  • 153
  • 1
  • 3
  • 6
4
votes
2 answers

Spring Cloud Kubernetes - Spring boot not reading config map

I have a spring boot web app which simply prints a property that is passed in a Kubernetes' ConfigMap. This is my main class: @SpringBootApplication @EnableDiscoveryClient @RestController public class DemoApplication { private MyConfig config; …
4
votes
2 answers

How can we use url of datasource in kubernetes while creating configmap

How can we use url of datasource in kubernetes while creating configmap like ex. kubectl create configmap config-from-file --from-file=https://url-to-file-location
3
votes
1 answer

Kustomize: how to reference a value from a ConfigMap in another resource/overlay?

I have a couple of overlays (dev, stg, prod) pulling data from multiple bases where each base contains a single service so that each overlay can pick and choose what services it needs. I generate the manifests from the dev/stg/prod directories. A…
unboundedcauchy
  • 113
  • 2
  • 8
3
votes
2 answers

Concating values from configMap and secret

I have a configMap file: apiVersion: v1 kind: ConfigMap metadata: labels: owner: testdb name: testdb-configmap data: host: postgres port: "5432" and a secret file: aapiVersion: v1 kind: Secret type: Opaque metadata: labels: …
Alpesh
  • 606
  • 6
  • 15
3
votes
1 answer

Separate Kubernetes ConfigMap data fields into individual files

I'm playing around with kubernetes ConfigMaps. In the official documentation, I see "file-like keys" in the data field: apiVersion: v1 kind: ConfigMap metadata: name: game-demo data: # file-like keys game.properties: | …
Johnny Metz
  • 5,977
  • 18
  • 82
  • 146
3
votes
1 answer

Is there a library to use kubernetes configmap as key-value store for persistence?

I am looking for a Python library to use Kubernetes directly as key-value store. I am thinking of sth. as follows: # initialize a configmap store = python_keyvalue.init_cm("configmap-name") # set the…
iptizer
  • 1,088
  • 1
  • 10
  • 19