netmaker-dns.yaml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: netmaker-dns
  5. labels:
  6. app: netmaker-dns
  7. spec:
  8. selector:
  9. matchLabels:
  10. app: netmaker-dns
  11. replicas: 1
  12. template:
  13. metadata:
  14. labels:
  15. app: netmaker-dns
  16. spec:
  17. containers:
  18. - args:
  19. - -conf
  20. - /root/dnsconfig/Corefile
  21. image: coredns/coredns
  22. imagePullPolicy: Always
  23. name: netmaker-dns
  24. ports:
  25. - containerPort: 53
  26. name: dns
  27. protocol: UDP
  28. - containerPort: 53
  29. name: dns-tcp
  30. protocol: TCP
  31. volumeMounts:
  32. - mountPath: /root/dnsconfig
  33. name: nm-pvc
  34. readOnly: true
  35. securityContext:
  36. allowPrivilegeEscalation: false
  37. capabilities:
  38. add:
  39. - NET_BIND_SERVICE
  40. drop:
  41. - all
  42. dnsPolicy: "None"
  43. dnsConfig:
  44. nameservers:
  45. - 127.0.0.1
  46. volumes:
  47. - name: nm-pvc
  48. persistentVolumeClaim:
  49. claimName: nm-pvc
  50. ---
  51. apiVersion: v1
  52. kind: Service
  53. metadata:
  54. labels:
  55. app: netmaker-dns
  56. name: netmaker-dns
  57. spec:
  58. ports:
  59. - port: 53
  60. protocol: UDP
  61. targetPort: 53
  62. name: udp
  63. - port: 53
  64. protocol: TCP
  65. targetPort: 53
  66. name: tcp
  67. selector:
  68. app: netmaker-dns
  69. sessionAffinity: None
  70. type: ClusterIP
  71. clusterIP: 10.152.183.53