Skip to content

Commit 986ab9a

Browse files
committed
amend coredns config for network and deploy
1 parent 176651c commit 986ab9a

File tree

5 files changed

+22
-29
lines changed

5 files changed

+22
-29
lines changed

clusters/home/core/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
44
- ./cockroachdb.yaml
5-
# - ./coredns.yaml
5+
- ./coredns.yaml
66
- ./longhorn.yaml
77
- ./mariadb.yaml
88
- ./metallb.yaml

core/coredns/config.yaml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,19 @@
22
apiVersion: v1
33
kind: ConfigMap
44
metadata:
5-
name: coredns-config
5+
name: coredns
66
data:
77
Corefile: |-
8-
. {
9-
errors
10-
health {
11-
lameduck 5s
12-
}
13-
ready
14-
hosts /etc/coredns/Hosts {
15-
fallthrough
16-
}
17-
forward . 1.1.1.1:53 {
18-
max_concurrent 1000
19-
}
20-
cache 30
21-
loop
22-
reload
23-
loadbalance
8+
.:53 {
9+
log
10+
errors
11+
12+
template IN A {
13+
match "^(.*\.)local\.claytonc\.dev\.$"
14+
answer "{{ .Name }} 60 IN A 10.56.1.101"
15+
fallthrough
16+
}
17+
18+
forward . 10.56.1.1
19+
cache 30
2420
}
25-
Hosts: |-
26-
${INTERNAL_LB} *.local.claytonc.dev

core/coredns/deployment.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ spec:
2222
containers:
2323
- name: coredns
2424
image: "coredns/coredns"
25+
args:
26+
- -conf
27+
- /etc/coredns/Corefile
2528
resources:
2629
requests:
2730
memory: "250Mi"
@@ -33,14 +36,11 @@ spec:
3336
env:
3437
- name: TZ
3538
value: PT
36-
ports:
37-
- name: dns
38-
containerPort: 53
39-
protocol: UDP
4039
volumeMounts:
4140
- name: config
42-
mountPath: /etc/coredns
41+
mountPath: /etc/coredns/Corefile
42+
subPath: Corefile
4343
volumes:
4444
- name: config
4545
configMap:
46-
name: coredns-config
46+
name: coredns

core/coredns/loadbalancer.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ spec:
1010
type: LoadBalancer
1111
ports:
1212
- port: 53
13-
targetPort: dns
1413
protocol: UDP
15-
name: dns
14+
- port: 53
15+
protocol: TCP
1616
selector:
1717
app.kubernetes.io/name: coredns

core/coredns/namespace.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ apiVersion: v1
22
kind: Namespace
33
metadata:
44
name: coredns
5-

0 commit comments

Comments
 (0)