https://orbstack.dev logo
Error: Error response from daemon: invalid mount c...
# support
l
Hello, We've been using OrbStack for quite sometime to run Kubernetes clusters locally for our devs, however starting from version 2.0.2 we started having issues with PVs, take this example mysql deployment:
Copy code
apiVersion: v1
kind: PersistentVolume
metadata:
  name: test-mysql-pv
spec:
  capacity:
    storage: 5Gi
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Delete
  storageClassName: manual
  hostPath:
    path: test-mysql # Cause of the error

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: test-mysql-pvc
spec:
  storageClassName: manual
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 5Gi

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: test-mysql
spec:
  replicas: 1
  selector:
    matchLabels:
      app: test-mysql
  template:
    metadata:
      labels:
        app: test-mysql
    spec:
      containers:
      - name: mysql
        image: mysql:8.0
        env:
        - name: MYSQL_ROOT_PASSWORD
          value: "changeme"
        ports:
        - containerPort: 3306
          name: mysql
        volumeMounts:
        - name: mysql-storage
          mountPath: /var/lib/mysql
      volumes:
      - name: mysql-storage
        persistentVolumeClaim:
          claimName: test-mysql-pvc
With the above example i get the following error when the pod tries to mount the volume:
Error: Error response from daemon: invalid mount config for type "bind": invalid mount path: 'test-mysql' mount path must be absolute
This is related to the
hostPath
value being set to
test-mysql
without the full path which is intended because in version 2.0.1 and prior, PVs declared this way appear in the Volumes section of the Orbstack GUI. Again this method worked fine up until version 2.0.2, any idea why this is happening ? Thanks in advance for any help !
Also just created the issue on github if that could help accelerating thing -> https://github.com/orbstack/orbstack/issues/2208