Weixk

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

  •  
  •   Weixk · Apr 23, 2020 · 5110 views
    This topic created in 2209 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   ·   952 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 51ms · UTC 21:25 · PVG 05:25 · LAX 14:25 · JFK 17:25
    ♥ Do have faith in what you're doing.