I'd like to access and edit files in my Kubernetes PersistentVolume on my local computer (macOS), but I cannot understand where to find those files!
I'm pointing my hostPath
to /tmp/wordpress-volume
but I cannot find it anywhere. What is the hidden secret I'm missing
I'm using the following configuration on a docker-for-desktop cluster Version 2.0.0.2 (30215)
.
PersistentVolume
kind: PersistentVolume
metadata:
name: wordpress-volume
spec:
# ...
hostPath:
path: /tmp/wordpress-volume
PersistentVolumeClaim
kind: PersistentVolumeClaim
metadata:
name: wordpress-volume-claim
# ...
Deployment
kind: Deployment
metadata:
name: wordpress
# ...
spec:
containers:
- image: wordpress:4.8-apache
# ...
volumeMounts:
- name: wordpress-volume
mountPath: /var/www/html
volumes:
- name: wordpress-volume
persistentVolumeClaim:
claimName: wordpress-volume-claim