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 in Kubernetes by Karan
• 3,610 points
95 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 by Sirajul
• 30,140 points

Related Questions In Kubernetes

0 votes
1 answer
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 in Kubernetes by DareDev
• 6,810 points
519 views
0 votes
2 answers

Difference between a Deployment and a DaemonSet in Kubernetes

Adding to @Rohit's answer, I'll explain about ...READ MORE

answered Jan 6 in Kubernetes by Ramya
914 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

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

answered Jan 17 in Others by anonymous
2,569 views
+3 votes
1 answer
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 in Kubernetes by Sirajul
• 30,140 points
79 views
0 votes
1 answer

What are the container hooks available in kubernetes?

The hooks enable Containers to be aware ...READ MORE

answered Jul 15 in Kubernetes by Sirajul
• 30,140 points
27 views