From 23f9cc18b38b16d3b0a9865e35deea81c9db1883 Mon Sep 17 00:00:00 2001 From: Joshua Moody Date: Tue, 16 Jun 2020 16:01:50 -0700 Subject: [PATCH] Hardcode nfs service cluster ip So that on a delete & recreate of the service the previous pv's still point to this nfs-provisioner. We cannot use the hostname since the actual host doesn't know how to resolve service addresses inside of the cluster. To support this would require the installation of kube-dns and modification to the /etc/resolve.conf file on each host. Signed-off-by: Joshua Moody --- examples/rwx/02-longhorn-nfs-provisioner.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/rwx/02-longhorn-nfs-provisioner.yaml b/examples/rwx/02-longhorn-nfs-provisioner.yaml index e60e9e0..97fa870 100644 --- a/examples/rwx/02-longhorn-nfs-provisioner.yaml +++ b/examples/rwx/02-longhorn-nfs-provisioner.yaml @@ -10,6 +10,10 @@ metadata: labels: app: longhorn-nfs-provisioner spec: + # hardcode a cluster ip for the service + # so that on delete & recreate of the service the previous pv's still point + # to this nfs-provisioner, pick a new ip for each new nfs provisioner + clusterIP: 10.43.111.111 ports: - name: nfs port: 2049