What is the difference between config map and secret in kubernetes

0 votes
Could somebody explain when we already had secrets in kubernetes ,there came the concept of config maps. What's the difference between the two?
Jul 17, 2019 in Kubernetes by Karan
• 19,610 points
3,455 views

1 answer to this question.

0 votes

Config maps ideally stores application configuration in a plain text format whereas Secrets store sensitive data like password in an encrypted format.

Both config maps and secrets can be used as volume and mounted inside a pod through a pod definition file.

Config map:

        kubectl create configmap myconfigmap
 --from-literal=env=dev

Secret:

echo -n ‘admin’ > ./username.txt
echo -n ‘abcd1234’ ./password.txt
kubectl create secret generic mysecret --from-file=./username.txt --from-file=./password.txt
answered Jul 17, 2019 by Sirajul
• 59,230 points

Related Questions In Kubernetes

0 votes
1 answer
0 votes
1 answer

What is the difference between Apache Mesos and Kubernetes?

Hi@akhtar, Kubernetes and Apache Mesos are DevOps infrastructure ...READ MORE

answered Dec 16, 2020 in Kubernetes by MD
• 95,440 points
852 views
0 votes
1 answer

What's the difference between kubernetes load balancer and ingress controller?

Load Balancer: So Kubernetes LoadBalancer just points ...READ MORE

answered Jan 4, 2019 in Kubernetes by DareDev
• 6,890 points
13,512 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,618 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,111 views
0 votes
1 answer

What all components is the Master server in Kubernetes made up of?

Kubernetes is a combination of multiple parts ...READ MORE

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

What is Scaling in Kubernetes and how would you enable it?

On Google Compute Engine (GCE) and Google Container Engine (GKE) (and ...READ MORE

answered Feb 11, 2020 in Kubernetes by anonymous
• 59,230 points
803 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