8000 minikube/docs/persistent_volumes.md at v0.19.1 · jakm/minikube · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
30 lines (25 loc) · 883 Bytes

persistent_volumes.md

File metadata and controls

30 lines (25 loc) · 883 Bytes

Persistent Volumes

Minikube supports PersistentVolumes of type hostPath. These PersistentVolumes are mapped to a directory inside the minikube VM.

The Minikube VM boots into a tmpfs, so most directories will not be persisted across reboots (minikube stop). However, Minikube is configured to persist files stored under the following directories in the minikube VM:

  • /data
  • /var/lib/localkube
  • /var/lib/docker
  • /tmp/hostpath_pv
  • /tmp/hostpath-provisioner

Here is an example PersistentVolume config to persist data in the '/data' directory:

apiVersion: v1
kind: PersistentVolume
metadata:
  name: pv0001
2EF7

spec:
  accessModes:
    - ReadWriteOnce
  capacity:
    storage: 5Gi
  hostPath:
    path: /data/pv0001/

You can also achieve persistence by creating a PV in a mounted host folder.

0