1

I am struggeling to mount a PVC to /root/.guacamole in my pod. Mounting to /root/extensions works, but .guacamole doesn't let the pod boot. Basically, I would like to include the file guacamole-auth-totp-1.1.0.jar to the existing containers location /root/.guacamole/extensions (dont replace; even though kubernetes does not support that too well):

Works

        volumeMounts:
      - mountPath: "/root/extensions"
        name: vol-guacamole
        subPath: guacamole-auth-totp-1.1.0.jar
  volumes:
    - name: vol-guacamole
      persistentVolumeClaim: 
        claimName: guacamole-app-pvc

Fails

        volumeMounts:
      - mountPath: "/root/.guacamole/extensions"
        name: vol-guacamole
        subPath: guacamole-auth-totp-1.1.0.jar
  volumes:
    - name: vol-guacamole
      persistentVolumeClaim: 
        claimName: guacamole-app-pvc

Kubectl get all -o wide

kubectl describe pod

kubectl logs pod
rm: cannot remove '/root/.guacamole/extensions': Device or resource busy

Kubernetes Version

kubectl version
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.0", GitCommit:"70132b0f130acc0bed193d9ba59dd186f0e634cf", GitTreeState:"clean", BuildDate:"2019-12-07T21:20:10Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.0", GitCommit:"70132b0f130acc0bed193d9ba59dd186f0e634cf", GitTreeState:"clean", BuildDate:"2019-12-07T21:12:17Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"linux/amd64"}

PV and PVC (without file mount)

kubectl get pv,pvc -n guacamole
NAME                                             CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                                      STORAGECLASS   REASON   AGE
[...]
persistentvolume/guacamole-app-pv                10Gi       RWO            Retain           Bound    guacamole/guacamole-app-pvc                manual                  4d15h
[...]

NAME                                      STATUS   VOLUME             CAPACITY   ACCESS MODES   STORAGECLASS   AGE
persistentvolumeclaim/guacamole-app-pvc   Bound    guacamole-app-pv   10Gi       RWO            manual         4d15h

PV and PVC (with file mount)

kubectl get pv,pvc -n guacamole
NAME                                             CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                                      STORAGECLASS   REASON   AGE
[...]
persistentvolume/guacamole-app-pv                10Gi       RWO            Retain           Bound    guacamole/guacamole-app-pvc                manual                  39s
[...]

NAME                                      STATUS   VOLUME             CAPACITY   ACCESS MODES   STORAGECLASS   AGE
persistentvolumeclaim/guacamole-app-pvc   Bound    guacamole-app-pv   10Gi       RWO            manual         39s
Fabiansc
  • 241
  • 2
  • 5
  • 12

0 Answers0