<p>What are the differences between secrets and configmap in term of security?</p>

<p>In which cases would I want to use secret instead of configmap? </p>

<p>Secrets are stored encoded and over time will <a href="https://github.com/kubernetes/kubernetes/issues/12742" rel="noreferrer">become more protected</a> (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. <a href="https://github.com/kelseyhightower/conf2kube" rel="noreferrer">conf2kube</a>). </p>

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