l0kki
10/23/2025, 4:28 PMapiVersion: 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 !l0kki
10/30/2025, 10:29 AM