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
• 16,050 points
1,112 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
• 57,940 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, 2019 in Kubernetes by DareDev
• 6,850 points
5,298 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, 2019 in Kubernetes by Ramya
2,398 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
8,363 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 11, 2019 in Kubernetes by Kalgi
• 51,950 points

reshown Apr 12, 2019 by Kalgi 2,522 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
• 57,940 points
268 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 in Kubernetes by anonymous
• 57,940 points
194 views