DEV Community

Discussion on: Run Kubernetes Pod with root privileges (not recommended)

Collapse
 
lariskovski profile image
Larissa

Well, thank you for the work around. <3 I don't understand people saying over and over it's an anti-pattern and then not offering a better solution lol anyway, here's a init container that might work in case of volume issues:

  initContainers:
    - name: fix-ownership
      image: alpine:3.6
      command: ["chown", "-R", "1000:100", "/somedir"]
      volumeMounts:
        - name: data
          mountPath: /somedir