I was wondering if there is any advantage of using secrets over standard file mounting in Kubernetes. I have to provide credentials, saved on the host machine to one of pods and just cannot understand what are the pros of using them.
The main idea of using secrets is to reduce exposure and make it more secure. It was specifically designed for this. As per documentation:
tmpfs
and not written to disk. Once the pod that is using the secret is gone, kubelet will delete its local copy of the secret on that node.644
)