Create dotfiles in Secret volumes in Kubernetes

Files beginning with dot characters are hidden from the output of ls -l, you must use ls -la to see them when listing directory contents.

By defining a key that begins with a dot in the Secret definion, you can make Kubernetes to create a dotfile in the container when Secret is mounted into a volume.

Example:

apiVersion: v1
kind: Secret
metadata:
  name: dotfiles-secret
data:
  .file1: dmFsdWUtMg0KDQo=
  .file2: dmFsdWUtMQ==
So, if you mount the above Secret as a volume in a specific path, 2 hidden files (dotfiles) will be created in target directory.