Skip to content

Commit

Permalink
Configure /data as a persisted directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlorenc committed Aug 4, 2016
1 parent f55fb58 commit c2b00e4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,29 @@ To determine the NodePort for your service, you can use a `kubectl` command like
Minikube supports [PersistentVolumes](http://kubernetes.io/docs/user-guide/persistent-volumes/) 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 host directories:

* `/data`
* `/var/lib/localkube`
* `/var/lib/docker`

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

```yaml
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv0001
spec:
accessModes:
- ReadWriteOnce
capacity:
storage: 5Gi
hostPath:
path: /data/pv0001/
```
## Private Container Registries
To access a private container registry, follow the steps on [this page](http://kubernetes.io/docs/user-guide/images/).
Expand Down
3 changes: 3 additions & 0 deletions deploy/iso/bootlocal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ PARTNAME=`echo "$BOOT2DOCKER_DATA" | sed 's/.*\///'`

mkdir -p /mnt/$PARTNAME/var/lib/localkube
ln -s /mnt/$PARTNAME/var/lib/localkube /var/lib/localkube

mkdir -p /mnt/$PARTNAME/data
ln -s /mnt/$PARTNAME/data /data

0 comments on commit c2b00e4

Please sign in to comment.