You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
2.5 KiB

  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: powerdns
  5. namespace: inhouse-dns
  6. spec:
  7. # high availability
  8. replicas: 2
  9. selector:
  10. matchLabels:
  11. app: powerdns
  12. template:
  13. metadata:
  14. labels:
  15. app: powerdns
  16. spec:
  17. topologySpreadConstraints:
  18. - maxSkew: 1
  19. topologyKey: zone
  20. whenUnsatisfiable: DoNotSchedule
  21. containers:
  22. - name: powerdns
  23. image: pschiffe/pdns-mysql
  24. ports:
  25. - containerPort: 53
  26. env:
  27. # mysql
  28. - name: PDNS_gmysql_host
  29. value: "mysql"
  30. - name: PDNS_gmysql_port
  31. value: "3306"
  32. - name: PDNS_gmysql_user
  33. value: "root"
  34. - name: PDNS_gmysql_password
  35. value: "powerdns"
  36. - name: PDNS_gmysql_dbname
  37. value: "powerdns"
  38. - name: PDNS_master
  39. value: "yes"
  40. # api settings needed for dns-01 certs
  41. - name: PDNS_api
  42. value: "yes"
  43. - name: PDNS_api_key
  44. value: "password"
  45. - name: PDNS_webserver
  46. value: "yes"
  47. - name: PDNS_webserver_address
  48. value: "0.0.0.0"
  49. - name: PDNS_webserver_password
  50. value: "password"
  51. - name: PDNS_webserver_allow_from
  52. value: "10.0.0.0/16 10.1.0.0/16"
  53. - name: PDNS_dnsupdate
  54. value: "yes"
  55. - name: PDNS_allow_dnsupdate_from
  56. value: "10.1.0.0/16"
  57. ---
  58. # for linking with the global nameservers
  59. apiVersion: v1
  60. kind: Service
  61. metadata:
  62. name: public-v6
  63. namespace: inhouse-dns
  64. spec:
  65. ipFamily: IPv6
  66. externalIPs:
  67. - 2a02:8106:33:3300::53
  68. - 2a02:8106:33:3300::54
  69. ports:
  70. - name: udp
  71. protocol: UDP
  72. port: 53
  73. targetPort: 53
  74. - name: tcp
  75. protocol: TCP
  76. port: 53
  77. targetPort: 53
  78. selector:
  79. app: powerdns
  80. ---
  81. # for linking with the global nameservers
  82. apiVersion: v1
  83. kind: Service
  84. metadata:
  85. name: public-v4
  86. namespace: inhouse-dns
  87. spec:
  88. # forwarded floating ip
  89. externalIPs:
  90. - 10.0.0.80
  91. ports:
  92. - name: udp
  93. protocol: UDP
  94. port: 53
  95. targetPort: 53
  96. - name: tcp
  97. protocol: TCP
  98. port: 53
  99. targetPort: 53
  100. selector:
  101. app: powerdns
  102. ---
  103. # expose internally for the admin ui
  104. apiVersion: v1
  105. kind: Service
  106. metadata:
  107. name: api
  108. namespace: inhouse-dns
  109. spec:
  110. ports:
  111. - name: api
  112. protocol: TCP
  113. port: 8081
  114. targetPort: 8081
  115. selector:
  116. app: powerdns