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
15
votes
1 answer

Delete key from configmap in Kubernetes

Is there a nice way to delete a specific key from a Kubernetes configmap, using kubectl? Right now I run: $ kubectl edit configmap myconfigmap and then I delete the entry but I would like a solution that can be run as a script.
rvabdn
  • 947
  • 6
  • 20
14
votes
2 answers

Mistakenly updated configmap aws-auth with rbac & lost access to the cluster

Was trying to restrict IAM users with the rbac of AWS EKS cluster. Mistakenly updated the configmap "aws-auth" from kube-system namespace. This removed the complete access to the EKS cluster. Missed to add the groups: in the configmap for the…
Sandy
  • 946
  • 11
  • 14
14
votes
3 answers

Create configmaps from files recursively

I have multiple configuration files in two directories. For example, conf.d/parentconf1.conf con.d/node1/child1.conf conf.d/node2/child2.conf I need to mount these configuration files in the same directory structure to kubernetes pod using…
nashter
  • 1,181
  • 1
  • 15
  • 33
12
votes
1 answer

Where does ConfigMap data gets stored?

I created ConfigMap using kubectl and I can also see it using: kubectl get cm I am just curious where kubernetes stores this data/information within the cluster? Does it store in etc? How do I view it, if it stored in etcd? Does it store in any…
Ramesh
  • 353
  • 3
  • 8
10
votes
6 answers

kubernetes: How to create and use configmap from multiple files

I have the documentation regarding the configmap: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#define-container-environment-variables-using-configmap-data From what I understand is I can create a config…
Vikas Rathore
  • 8,242
  • 8
  • 35
  • 54
10
votes
3 answers

Error communicating with the configmap

Hi I am using google kubernetes engine to deploy my application. I tried to add a configMap apiVersion: v1 kind: ConfigMap metadata: name: configmap namespace: default data: database_user: root database_password: root database_db: db …
Ennar.ch
  • 659
  • 1
  • 8
  • 26
9
votes
3 answers

How to edit configmap configuration in spring boot kubernetes application during runtime

We have application with huge configuration (this is just a part): apiVersion: v1 kind: ConfigMap metadata: name: my-app data: application.yaml: |- config: app: MY-APP my-custom-map: KEY1: value1 KEY2: value2 …
hudi
  • 15,555
  • 47
  • 142
  • 246
9
votes
3 answers

k8s: configMap does not work in deployment

We ran into an issue recently as to using environment variables inside container. OS: windows 10 pro k8s cluster: minikube k8s version: 1.18.3 1. The way that doesn't work, though it's preferred way for us Here is the deployment.yaml using…
zeisen
  • 105
  • 2
  • 7
9
votes
2 answers

How to get notification inside an application in kubernetes when configmaps get updated

I have an application running inside kubernetes which has a file mounted through configmaps. Now, from inside the application I want to perform some action when this file (from configmap) gets updated (lets say through kubectl update configmaps xyz…
Amudhan
  • 696
  • 8
  • 18
8
votes
3 answers

Kubernetes multiple identical app and database deployments with different config

The dilemma: Deploy multiple app and database container pairs with identical docker image and code, but different config (different clients using subdomains). What are some logical ways to approach this, as it doesn't seem kubernetes has an…
Mick
  • 413
  • 4
  • 14
8
votes
2 answers

How to patch configmap in json file with kustomize?

How to patch "db.password" in the following cm with kustomize? comfigmap: apiVersion: v1 data: dbp.conf: |- { "db_properties": { "db.driver": "com.mysql.jdbc.Driver", "db.password": "123456", "db.user": "root" …
Lior
  • 81
  • 1
  • 3
8
votes
1 answer

Inject secret value to configmap during deployment without using environment variables

I have a configmap like this apiVersion: v1 kind: ConfigMap metadata: namespace: develop name: test-config data: app.conf: | connection conn1 address 127.0.0.1:8080 user cluster1 password: app.conf…
jmhostalet
  • 4,399
  • 4
  • 38
  • 47
7
votes
1 answer

Nginx controller Client Authentication optional_no_ca not working

We are using Kubernetes and we need to check the client cert. What we need is to configure the Nginx ingress controller in order to pass the client certificate (if present) to the back-end service. We successfully configured it in our test…
Angelo Immediata
  • 6,635
  • 4
  • 33
  • 65
7
votes
4 answers

helm upgrade fails with "function "X" not defined"

I'm trying to upgrade a helm chart, I get the error function "pod" not defined which make sense because I really have no such function. The "pod" is coming from a json file which I convert into a configmap and helm is reading this value as a…
Shahar Hamuzim Rajuan
  • 5,610
  • 9
  • 53
  • 91
7
votes
1 answer

Make large static data files available to kubernetes pods

I have a few quite large UTF-8 data files that pods need to load into memory on start up - from a couple of hundred KBs to around 50 MB. The project (including helm chart) is open source but some of these files are not - otherwise I would probably…
AntonOfTheWoods
  • 809
  • 13
  • 17
1
2
3
33 34