Kubernetes when to use secrets instead of configmap?

4/25/2016

What are the differences between secrets and configmap in term of security?

In which cases would I want to use secret instead of configmap?

-- ant31
kubernetes

3 Answers

3/13/2020

You can compare
Secrets with Password Manager.
ConfigMap with TextFile.
Obviously, Secrets are safer than ConfigMaps as they are encoded.

-- AATHITH RAJENDRAN
Source: StackOverflow

6/1/2018

Most importantly secrets are stored in tmpfs, an in memory file system, and are never persisted to a node file system.

Conversely they consume RAM.

-- Jason
Source: StackOverflow

4/27/2016

Secrets are stored encoded and over time will become more protected (e.g. limited access, encrypted at rest, etc). Secrets existed before ConfigMap was created, so until recently it was common to store configuration data in secrets (e.g. conf2kube).

You should use secrets for sensitive data (database passwords, private keys) and ConfigMaps for non-sensitive configuration data.

-- Robert Bailey
Source: StackOverflow