forked from MatthewVance/unbound-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment.yml
128 lines (121 loc) · 4.04 KB
/
deployment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# This file is an example! Do not use before editing it!
apiVersion: v1
kind: ConfigMap
metadata:
name: unbound-main-conf
data:
unbound.conf: |
<INSERT CONF>
---
apiVersion: v1
kind: ConfigMap
metadata:
name: unbound-a-records-conf
data:
a-records.conf: |
server:
# Your internal network name and addresses go here
private-domain: "your-awesome-domain.local"
domain-insecure: "your-awesome-domain.local"
local-zone: "your-awesome-domain.local" transparent
local-data: "k8s.your-awesome-domain.local IN A 172.30.0.1"
#local-data-ptr: "172.30.0.1 your-awesome-domain.local"
---
apiVersion: v1
kind: ConfigMap
metadata:
name: unbound-forward-records-conf
data:
forward-records.conf: |
forward-zone:
# Forward all queries (except those in cache and local zone) to
# upstream recursive servers
name: "."
# Queries to this forward zone use TLS
forward-tls-upstream: yes
# https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Test+Servers
# Cloudflare
forward-addr: 1.1.1.1@853#cloudflare-dns.com
forward-addr: 1.0.0.1@853#cloudflare-dns.com
#forward-addr: 2606:4700:4700::1111@853#cloudflare-dns.com
#forward-addr: 2606:4700:4700::1001@853#cloudflare-dns.com
# CleanBrowsing
forward-addr: 185.228.168.9@853#security-filter-dns.cleanbrowsing.org
forward-addr: 185.228.169.9@853#security-filter-dns.cleanbrowsing.org
# forward-addr: 2a0d:2a00:1::2@853#security-filter-dns.cleanbrowsing.org
# forward-addr: 2a0d:2a00:2::2@853#security-filter-dns.cleanbrowsing.org
# Quad9
# forward-addr: 9.9.9.9@853#dns.quad9.net
# forward-addr: 149.112.112.112@853#dns.quad9.net
# forward-addr: 2620:fe::fe@853#dns.quad9.net
# forward-addr: 2620:fe::9@853#dns.quad9.net
# getdnsapi.net
# forward-addr: 185.49.141.37@853#getdnsapi.net
# forward-addr: 2a04:b900:0:100::37@853#getdnsapi.net
# Surfnet
# forward-addr: 145.100.185.15@853#dnsovertls.sinodun.com
# forward-addr: 145.100.185.16@853#dnsovertls1.sinodun.com
# forward-addr: 2001:610:1:40ba:145:100:185:15@853#dnsovertls.sinodun.com
# forward-addr: 2001:610:1:40ba:145:100:185:16@853#dnsovertls1.sinodun.com
---
apiVersion: v1
kind: ConfigMap
metadata:
name: unbound-srv-records-conf
data:
srv-records.conf: |
# SRV records
# _service._proto.name. | TTL | class | SRV | priority | weight | port | target.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: dns
spec:
replicas: 1
selector:
matchLabels:
app: unbound-dns
strategy:
type: Recreate
template:
metadata:
labels:
app: unbound-dns
spec:
containers:
- image: mvance/unbound
imagePullPolicy: IfNotPresent
name: dns-unbound
ports:
- containerPort: 53
hostPort: 53
protocol: UDP
resources: {}
volumeMounts:
- name: unbound-main-conf-volume
mountPath: /opt/unbound/etc/unbound/unbound.conf
subPath: unbound.conf
- name: unbound-a-conf-volume
mountPath: /opt/unbound/etc/unbound/a-records.conf
subPath: a-records.conf
- name: unbound-forward-conf-volume
mountPath: /opt/unbound/etc/unbound/forward-records.conf
subPath: forward-records.conf
- name: unbound-srv-conf-volume
mountPath: /opt/unbound/etc/unbound/srv-records.conf
subPath: srv-records.conf
restartPolicy: Always
volumes:
- name: unbound-main-conf-volume
configMap:
name: unbound-main-conf
- name: unbound-a-conf-volume
configMap:
name: unbound-a-records-conf
- name: unbound-forward-conf-volume
configMap:
name: unbound-forward-records-conf
- name: unbound-srv-conf-volume
configMap:
name: unbound-srv-records-conf