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,729 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,460 points
1,088 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,922 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
15,477 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,036 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,397 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
1,056 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