加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

启用了SELINUX的Kubernetes Secrets的权限被拒绝

发布时间:2020-12-13 22:58:39 所属栏目:Linux 来源:网络整理
导读:我按照kubernetes文档来管理我的应用程序的秘密. http://kubernetes.io/v1.1/docs/user-guide/secrets.html 当pod启动时,kubernetes会在正确的位置安装密钥,但是应用程序无法读取文档中描述的秘密数据. root@quoter-controller-whw7k:/etc/quoter# whoamiroo
我按照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 =强制执行措施

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

解决方法

根据原子问题跟踪器,SELinux和Kubernetes Secrets存在已知问题,请参阅 ISSUE-117.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读