50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: coredns-custom
|
|
namespace: coredns
|
|
labels:
|
|
app: coredns-custom
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app: coredns-custom
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: coredns-custom
|
|
spec:
|
|
containers:
|
|
- name: coredns
|
|
image: coredns/coredns:1.11.1
|
|
args: ["-conf", "/etc/coredns/Corefile"]
|
|
ports:
|
|
- name: dns-udp
|
|
containerPort: 53
|
|
protocol: UDP
|
|
- name: dns-tcp
|
|
containerPort: 53
|
|
protocol: TCP
|
|
- name: metrics
|
|
containerPort: 9153
|
|
protocol: TCP
|
|
readinessProbe:
|
|
httpGet: { path: /health, port: 8080 }
|
|
initialDelaySeconds: 3
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet: { path: /health, port: 8080 }
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 20
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /etc/coredns
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: coredns-custom
|
|
items:
|
|
- key: Corefile
|
|
path: Corefile
|