Created
October 22, 2018 00:56
-
-
Save matthewpalmer/0f213028473546b14fd75b7ebf801115 to your computer and use it in GitHub Desktop.
Example for NFS server in Kubernetes
This file contains 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
# Note - an NFS server isn't really a Kubernetes | |
# concept. We're just creating it in Kubernetes | |
# for illustration and convenience. In practice, | |
# it might be run in some other system. | |
# Create a service to expose the NFS server | |
# to pods inside the cluster. | |
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: nfs-service | |
spec: | |
selector: | |
role: nfs | |
ports: | |
# Open the ports required by the NFS server | |
# Port 2049 for TCP | |
- name: tcp-2049 | |
port: 2049 | |
protocol: TCP | |
# Port 111 for UDP | |
- name: udp-111 | |
port: 111 | |
protocol: UDP | |
--- | |
# Run the NFS server image in a pod that is | |
# exposed by the service. | |
kind: Pod | |
apiVersion: v1 | |
metadata: | |
name: nfs-server-pod | |
labels: | |
role: nfs | |
spec: | |
containers: | |
- name: nfs-server-container | |
image: cpuguy83/nfs-server | |
securityContext: | |
privileged: true | |
args: | |
# Pass the paths to share to the Docker image | |
- /exports |
I came across this article while looking more into this issues but iam confused as of now https://redblink.com/setup-nfs-server-provisioner-kubernetes/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Could you please specify what you have done exactly? I run into the same problem and I am not able to solve it.