
apiVersion: apps/v1
kind: Deployment
metadata:
  name: service-dns
  namespace: infra
  labels:
    app: service-dns
spec:
  replicas: 1
  selector:
    matchLabels:
      app: service-dns
  template:
    metadata:
      labels:
        app: service-dns
    spec:
      containers:
      - name: coredns
        image: coredns/coredns
        ports:
          - containerPort: 53
            name: "dns"
        volumeMounts:
        - name: service-dns-config-volume
          mountPath: /etc/coredns
        - name: service-dns-config-volume
          mountPath: /Corefile
          subPath:  Corefile
      volumes:
        - name: service-dns-config-volume
          configMap:
            name: service-dns-config