mirror of https://github.com/k3s-io/k3s
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
parent
bd68007f80
commit
3411f4349d
|
@ -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"]
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -8,5 +8,7 @@ spec:
|
|||
port: 2049
|
||||
- name: mountd
|
||||
port: 20048
|
||||
- name: rpcbind
|
||||
port: 111
|
||||
selector:
|
||||
role: nfs-server
|
||||
|
|
Loading…
Reference in New Issue