アプリケーションのシークレットを管理するために、kubernetes のドキュメントに従いました。
http://kubernetes.io/v1.1/docs/user-guide/secrets.html
Pod が起動すると、kubernetes はシークレットを適切な場所にマウントしますが、ドキュメントに記載されているように、アプリケーションはシークレット データを読み取ることができません。
root@quoter-controller-whw7k:/etc/quoter# whoami
root
root@quoter-controller-whw7k:/etc/quoter# ls -l
ls: cannot access local.py: Permission denied
total 0
-????????? ? ? ? ? ? local.py
root@quoter-controller-whw7k:/etc/quoter# cat local.py
cat: local.py: Permission denied
それの何が問題なのですか?
強制モードで構成された SELinux
SELINUX=enforcing
Dockerは次のコマンドで起動しました
/usr/bin/docker daemon --registry-mirror=http://mirror.internal:5000 --selinux-enabled --insecure-registry registry.internal:5555 --storage-driver devicemapper --storage-opt dm.fs=xfs --storage-opt dm.thinpooldev=/dev/mapper/atomicos-docker--pool --bip=10.16.16.1/24 --mtu=8951