wireguard.yaml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. ---
  2. kind: Deployment
  3. apiVersion: apps/v1
  4. metadata:
  5. name: wireguard
  6. labels:
  7. app: wireguard
  8. spec:
  9. replicas: 1
  10. selector:
  11. matchLabels:
  12. app: wireguard
  13. template:
  14. metadata:
  15. labels:
  16. app: wireguard
  17. spec:
  18. containers:
  19. - name: wireguard
  20. image: lscr.io/linuxserver/wireguard:latest
  21. imagePullPolicy: Always
  22. securityContext:
  23. capabilities:
  24. add:
  25. - NET_ADMIN
  26. - SYS_MODULE
  27. env:
  28. - name: PUID
  29. value: "1000"
  30. - name: PGID
  31. value: "1000"
  32. - name: SERVERURL
  33. value: "wireguard.dezendorf.net"
  34. - name: SERVERPORT
  35. value: "51820"
  36. - name: PEERS
  37. value: "2"
  38. - name: PEERDNS
  39. value: "192.168.1.87"
  40. - name: INTERNAL_SUBNET
  41. value: "192.168.1.0/24"
  42. - name: ALLOWEDIPS
  43. value: "0.0.0.0/0"
  44. - name: LOG_CONFS
  45. value: "true"
  46. ports:
  47. - name: wireguard-udp
  48. containerPort: 51820
  49. protocol: UDP
  50. volumeMounts:
  51. - name: wireguard-config-nfs
  52. mountPath: "/config"
  53. subPath: "wireguard/config"
  54. volumes:
  55. - name: wireguard-config-nfs
  56. nfs:
  57. server: 192.168.1.87
  58. path: /tank/svc
  59. ---
  60. apiVersion: v1
  61. kind: Service
  62. metadata:
  63. name: wireguard-udp-svc
  64. spec:
  65. type: ClusterIP
  66. selector:
  67. app: wireguard
  68. ports:
  69. - name: wireguard-udp
  70. port: 51820
  71. targetPort: 51820
  72. protocol: UDP