How to create a ConfigMap from a file

0 votes

Hi Guys,

I want to create a ConfigMap from a file so that I can attach this to my Pod. How can I do that?

Aug 31, 2020 in Kubernetes by akhtar
• 38,230 points
595 views

1 answer to this question.

0 votes

Hi@akhtar,

You can pass in the --from-file argument multiple times to create a ConfigMap from multiple data sources. You can see the below command for reference.

$ kubectl create configmap game-config-2 --from-file=configure-pod-container/configmap/game.properties --from-file=configure-pod-container/configmap/ui.properties
answered Aug 31, 2020 by MD
• 95,440 points

Related Questions In Kubernetes

0 votes
1 answer

how to drain the traffic from a pod?

When we take the node for maintenance, ...READ MORE

answered Jul 17, 2019 in Kubernetes by Sirajul
• 59,230 points
1,724 views
0 votes
1 answer

How to configure a Pod to use the updated configMap?

If the config map is mounted into ...READ MORE

answered Jul 18, 2019 in Kubernetes by Sirajul
• 59,230 points
803 views
0 votes
0 answers

How to access the configmap created on a worker node, in the pod.yaml in Master?

1. Configmap is created on the node1. ...READ MORE

Apr 5, 2020 in Kubernetes by jayabmaguluri
• 140 points
778 views
0 votes
1 answer

How to copy file inside a Pod in Kubernetes?

Hi@akhtar, You need to use the kubectl cp command ...READ MORE

answered Jul 5, 2020 in Kubernetes by MD
• 95,440 points
4,443 views
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
14,613 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 12, 2019 in Kubernetes by Kalgi
• 52,360 points

reshown Apr 12, 2019 by Kalgi 6,098 views
0 votes
1 answer

How to create secrets from a text file in Kubernetes?

Hi@akhtar, Secrets can contain user credentials required by ...READ MORE

answered Jul 16, 2020 in Kubernetes by MD
• 95,440 points
2,161 views
0 votes
1 answer

How to create a ConfigMap from literals?

Hi@akhtar, You can use kubectl create configmap with the --from-literal argument to ...READ MORE

answered Aug 31, 2020 in Kubernetes by MD
• 95,440 points
1,619 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP