What is the value of Secrets compared to ConfigMaps

6/13/2018

I'm reading about Secrets but I'm not able to find the value of them to store user and password compared to Config Maps.

The content is not encrypted anyway and the way to handle or access a secret is exactly the same as using config maps.

And I think it is the same for storing certificates, I could use also ConfigMaps.

I only see the use for storing the credentials to access to a docker registry because it has a predefined structure understood by k8s.

I found this question: Kubernetes Secrets vs ConfigMaps But it is more than a year old, a lot of k8s versions.

What is the value of Secrets compared to ConfigMaps?

-- Jxadro
kubernetes

1 Answer

6/13/2018

What is the value of Secrets compared to ConfigMaps?

If you are sole user of your cluster and you issue commands as root/master/admin then, as you stated, probably minimal, but if your cluster is used by multiple users and you want to fine grain access rights using RBAC as stated in documentation then you could, for example, deny access to Secrets and alow access to ConfigMaps for particular user using RoleBindings or similar... Such user could handle settings for container without actually having access to credentials. We use such setup in our CI/CD pipeline for example.

-- Const
Source: StackOverflow