expose rpcbind service, so nfs client can use service IP to access NFS share

Signed-off-by: Huamin Chen <hchen@redhat.com>
pull/6/head
Huamin Chen 2016-05-10 18:24:24 +00:00
parent bd68007f80
commit 3411f4349d
3 changed files with 7 additions and 3 deletions

View File

@ -20,7 +20,7 @@ ADD run_nfs.sh /usr/local/bin/
ADD index.html /tmp/index.html
RUN chmod 644 /tmp/index.html
# expose mountd 20048/tcp and nfsd 2049/tcp
EXPOSE 2049/tcp 20048/tcp
# expose mountd 20048/tcp and nfsd 2049/tcp and rpcbind 111/tcp
EXPOSE 2049/tcp 20048/tcp 111/tcp 111/udp
ENTRYPOINT ["/usr/local/bin/run_nfs.sh", "/exports"]

View File

@ -13,12 +13,14 @@ spec:
spec:
containers:
- name: nfs-server
image: gcr.io/google-samples/nfs-server:1.0
image: hchen/nfs3-server:latest #gcr.io/google-samples/nfs-server:1.0
ports:
- name: nfs
containerPort: 2049
- name: mountd
containerPort: 20048
- name: rpcbind
containerPort: 111
securityContext:
privileged: true
volumeMounts:

View File

@ -8,5 +8,7 @@ spec:
port: 2049
- name: mountd
port: 20048
- name: rpcbind
port: 111
selector:
role: nfs-server