seedbox-nfs.yaml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # NOTE: rpcbind on a proxmox host conflicts with this container. Not using for now.
  2. #---
  3. #apiVersion: v1
  4. #kind: Namespace
  5. #metadata:
  6. # name: nfs
  7. #---
  8. #apiVersion: apps/v1
  9. #kind: Deployment
  10. #metadata:
  11. # name: nfs-seedbox
  12. # namespace: nfs
  13. #spec:
  14. # strategy:
  15. # type: Recreate
  16. # selector:
  17. # matchLabels:
  18. # app: nfs-seedbox
  19. # replicas: 1
  20. # template:
  21. # metadata:
  22. # labels:
  23. # app: nfs-seedbox
  24. # annotations:
  25. # backup.velero.io/backup-volumes-excludes: data
  26. # spec:
  27. # affinity:
  28. # nodeAffinity:
  29. # requiredDuringSchedulingIgnoredDuringExecution:
  30. # nodeSelectorTerms:
  31. # - matchExpressions:
  32. # - key: seedbox
  33. # operator: In
  34. # values:
  35. # - "true"
  36. # tolerations:
  37. # - key: seedbox
  38. # operator: Equal
  39. # value: "true"
  40. # effect: NoSchedule
  41. # hostNetwork: true
  42. # containers:
  43. # - name: nfs
  44. # image: erichough/nfs-server:2.2.1
  45. # ports:
  46. # - containerPort: 2049
  47. # name: nfs
  48. # securityContext:
  49. # privileged: true
  50. # volumeMounts:
  51. # - mountPath: "/data"
  52. # name: data
  53. # - mountPath: /etc/exports
  54. # name: exports
  55. # subPath: exports
  56. # readOnly: true
  57. # volumes:
  58. # - name: data
  59. # hostPath:
  60. # path: /seedbox
  61. # type: Directory
  62. # - name: exports
  63. # configMap:
  64. # name: seedbox-nfs-exports
  65. # items:
  66. # - key: exports
  67. # path: exports
  68. #---
  69. #apiVersion: v1
  70. #kind: ConfigMap
  71. #metadata:
  72. # name: seedbox-nfs-exports
  73. # namespace: nfs
  74. #data:
  75. # exports: |
  76. # /seedbox 127.0.0.1(rw) 172.16.69.30(rw) 172.16.69.31(rw) 172.16.69.32(rw) 172.16.69.253(rw) 10.42.0.0/16(rw)
  77. # Testing NFS access from within a pod
  78. # ---
  79. # apiVersion: v1
  80. # kind: Pod
  81. # metadata:
  82. # name: test-pd-2
  83. # namespace: nfs
  84. # spec:
  85. # containers:
  86. # - image: nginx:1.25.1
  87. # name: test-container
  88. # volumeMounts:
  89. # - mountPath: /my-nfs-data
  90. # name: test-volume
  91. # volumes:
  92. # - name: test-volume
  93. # nfs:
  94. # server: 172.16.69.253
  95. # path: /seedbox