Last active
May 25, 2020 22:10
-
-
Save zycon/a5667238c7d9343df64035ed25618d88 to your computer and use it in GitHub Desktop.
NFS Server yaml kubernete readwritemany
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ReplicationController | |
metadata: | |
name: nfs-server | |
namespace: default | |
spec: | |
replicas: 1 | |
selector: | |
role: nfs-server | |
template: | |
metadata: | |
labels: | |
role: nfs-server | |
spec: | |
containers: | |
- name: nfs-server | |
image: k8s.gcr.io/volume-nfs:0.8 | |
ports: | |
- name: nfs | |
containerPort: 2049 | |
- name: mountd | |
containerPort: 20048 | |
- name: rpcbind | |
containerPort: 111 | |
securityContext: | |
privileged: true | |
volumeMounts: | |
- mountPath: /exports | |
name: nashwan-storage-pvc | |
volumes: | |
- name: nashwan-storage-pvc | |
persistentVolumeClaim: | |
claimName: pv-claim-nfs | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nfs-server | |
namespace: default | |
spec: | |
ports: | |
- name: nfs | |
port: 2049 | |
selector: | |
role: nfs-server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment