提交 c2b00e4f 编写于 作者: D dlorenc

Configure /data as a persisted directory.

上级 f55fb58d
......@@ -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/).
......
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册