Weixk

如何修改 k8s 集群中容器挂载的 configmap 文件属主?

  •  
  •   Weixk · Apr 23, 2020 · 5133 views
    This topic created in 2215 days ago, the information mentioned may be changed or developed.

    stackoverflow 上有人提了一样的问题 https://stackoverflow.com/questions/56239932/how-can-i-change-user-of-configmap-data

    目前我的处理方式和答案中的一样,定义 fsGroup 属性之后。挂载的 configmap 文件属主和用户组会变成 root:xxxuser 。 这样做能满足我们的诉求(容器内程序非 root 账号启动,并且 others 用户不能读写文件权限) 但是看着容器内部文件中都是 xxxuser:xxxuser 里突然冒出个 root:xxxuser,有点强迫症想把它改掉,有没有人熟悉 k8s 的?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1026 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 23:04 · PVG 07:04 · LAX 16:04 · JFK 19:04
    ♥ Do have faith in what you're doing.