Skip to content

Instantly share code, notes, and snippets.

@kingdonb
Created June 27, 2017 23:30
Show Gist options
  • Save kingdonb/78f82adf9d3507aab6f397b0dd2526c3 to your computer and use it in GitHub Desktop.
Save kingdonb/78f82adf9d3507aab6f397b0dd2526c3 to your computer and use it in GitHub Desktop.
working NFS server on Kubernetes 1.6.4
diff --git a/examples/volumes/nfs/nfs-pv.yaml b/examples/volumes/nfs/nfs-pv.yaml
index 258f4d4c9d..c219f3aa39 100644
--- a/examples/volumes/nfs/nfs-pv.yaml
+++ b/examples/volumes/nfs/nfs-pv.yaml
@@ -2,12 +2,15 @@ apiVersion: v1
kind: PersistentVolume
metadata:
name: nfs
+ labels:
+ id: my-nfs-volume
spec:
+ storageClassName: nfs
capacity:
storage: 1Mi
accessModes:
- ReadWriteMany
nfs:
# FIXME: use the right IP
- server: 10.244.1.4
- path: "/exports"
+ server: 10.11.248.141
+ path: "/"
diff --git a/examples/volumes/nfs/nfs-pvc.yaml b/examples/volumes/nfs/nfs-pvc.yaml
index 9c1821f7c4..050d083fca 100644
--- a/examples/volumes/nfs/nfs-pvc.yaml
+++ b/examples/volumes/nfs/nfs-pvc.yaml
@@ -8,3 +8,7 @@ spec:
resources:
requests:
storage: 1Mi
+ selector:
+ matchLabels:
+ id: my-nfs-volume
+ storageClassName: nfs
diff --git a/examples/volumes/nfs/nfs-server-rc.yaml b/examples/volumes/nfs/nfs-server-rc.yaml
index c83ed1db87..c83baf2120 100644
--- a/examples/volumes/nfs/nfs-server-rc.yaml
+++ b/examples/volumes/nfs/nfs-server-rc.yaml
@@ -13,7 +13,7 @@ spec:
spec:
containers:
- name: nfs-server
- image: gcr.io/google-samples/nfs-server:1.1
+ image: gcr.io/google_containers/volume-nfs:0.8
ports:
- name: nfs
containerPort: 2049
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment