|
| 1 | +# Warning: This is a file generated from the base underscore template file: coredns.yaml.base |
| 2 | + |
| 3 | +apiVersion: v1 |
| 4 | +kind: ServiceAccount |
| 5 | +metadata: |
| 6 | + name: coredns |
| 7 | + namespace: kube-system |
| 8 | + labels: |
| 9 | + kubernetes.io/cluster-service: "true" |
| 10 | + addonmanager.kubernetes.io/mode: Reconcile |
| 11 | +--- |
| 12 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 13 | +kind: ClusterRole |
| 14 | +metadata: |
| 15 | + labels: |
| 16 | + kubernetes.io/bootstrapping: rbac-defaults |
| 17 | + addonmanager.kubernetes.io/mode: Reconcile |
| 18 | + name: system:coredns |
| 19 | +rules: |
| 20 | +- apiGroups: |
| 21 | + - "" |
| 22 | + resources: |
| 23 | + - endpoints |
| 24 | + - services |
| 25 | + - pods |
| 26 | + - namespaces |
| 27 | + verbs: |
| 28 | + - list |
| 29 | + - watch |
| 30 | +- apiGroups: |
| 31 | + - "" |
| 32 | + resources: |
| 33 | + - nodes |
| 34 | + verbs: |
| 35 | + - get |
| 36 | +--- |
| 37 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 38 | +kind: ClusterRoleBinding |
| 39 | +metadata: |
| 40 | + annotations: |
| 41 | + rbac.authorization.kubernetes.io/autoupdate: "true" |
| 42 | + labels: |
| 43 | + kubernetes.io/bootstrapping: rbac-defaults |
| 44 | + addonmanager.kubernetes.io/mode: EnsureExists |
| 45 | + name: system:coredns |
| 46 | +roleRef: |
| 47 | + apiGroup: rbac.authorization.k8s.io |
| 48 | + kind: ClusterRole |
| 49 | + name: system:coredns |
| 50 | +subjects: |
| 51 | +- kind: ServiceAccount |
| 52 | + name: coredns |
| 53 | + namespace: kube-system |
| 54 | +--- |
| 55 | +apiVersion: v1 |
| 56 | +kind: ConfigMap |
| 57 | +metadata: |
| 58 | + name: coredns |
| 59 | + namespace: kube-system |
| 60 | + labels: |
| 61 | + addonmanager.kubernetes.io/mode: EnsureExists |
| 62 | +data: |
| 63 | + Corefile: | |
| 64 | + .:53 { |
| 65 | + errors |
| 66 | + health { |
| 67 | + lameduck 5s |
| 68 | + } |
| 69 | + ready |
| 70 | + kubernetes dns_domain in-addr.arpa ip6.arpa { |
| 71 | + pods insecure |
| 72 | + fallthrough in-addr.arpa ip6.arpa |
| 73 | + ttl 30 |
| 74 | + } |
| 75 | + prometheus :9153 |
| 76 | + forward . /etc/resolv.conf { |
| 77 | + max_concurrent 1000 |
| 78 | + } |
| 79 | + cache 30 |
| 80 | + loop |
| 81 | + reload |
| 82 | + loadbalance |
| 83 | + } |
| 84 | +--- |
| 85 | +apiVersion: apps/v1 |
| 86 | +kind: Deployment |
| 87 | +metadata: |
| 88 | + name: coredns |
| 89 | + namespace: kube-system |
| 90 | + labels: |
| 91 | + k8s-app: kube-dns |
| 92 | + kubernetes.io/cluster-service: "true" |
| 93 | + addonmanager.kubernetes.io/mode: Reconcile |
| 94 | + kubernetes.io/name: "CoreDNS" |
| 95 | +spec: |
| 96 | + # replicas: not specified here: |
| 97 | + # 1. In order to make Addon Manager do not reconcile this replicas parameter. |
| 98 | + # 2. Default is 1. |
| 99 | + # 3. Will be tuned in real time if DNS horizontal auto-scaling is turned on. |
| 100 | + strategy: |
| 101 | + type: RollingUpdate |
| 102 | + rollingUpdate: |
| 103 | + maxUnavailable: 1 |
| 104 | + selector: |
| 105 | + matchLabels: |
| 106 | + k8s-app: kube-dns |
| 107 | + template: |
| 108 | + metadata: |
| 109 | + labels: |
| 110 | + k8s-app: kube-dns |
| 111 | + spec: |
| 112 | + securityContext: |
| 113 | + seccompProfile: |
| 114 | + type: RuntimeDefault |
| 115 | + priorityClassName: system-cluster-critical |
| 116 | + serviceAccountName: coredns |
| 117 | + affinity: |
| 118 | + podAntiAffinity: |
| 119 | + preferredDuringSchedulingIgnoredDuringExecution: |
| 120 | + - weight: 100 |
| 121 | + podAffinityTerm: |
| 122 | + labelSelector: |
| 123 | + matchExpressions: |
| 124 | + - key: k8s-app |
| 125 | + operator: In |
| 126 | + values: ["kube-dns"] |
| 127 | + topologyKey: kubernetes.io/hostname |
| 128 | + tolerations: |
| 129 | + - key: "CriticalAddonsOnly" |
| 130 | + operator: "Exists" |
| 131 | + nodeSelector: |
| 132 | + kubernetes.io/os: linux |
| 133 | + containers: |
| 134 | + - name: coredns |
| 135 | + image: k8s.gcr.io/coredns/coredns:v1.8.0 |
| 136 | + imagePullPolicy: IfNotPresent |
| 137 | + resources: |
| 138 | + limits: |
| 139 | + memory: 'dns_memory_limit' |
| 140 | + requests: |
| 141 | + cpu: 100m |
| 142 | + memory: 70Mi |
| 143 | + args: [ "-conf", "/etc/coredns/Corefile" ] |
| 144 | + volumeMounts: |
| 145 | + - name: config-volume |
| 146 | + mountPath: /etc/coredns |
| 147 | + readOnly: true |
| 148 | + ports: |
| 149 | + - containerPort: 53 |
| 150 | + name: dns |
| 151 | + protocol: UDP |
| 152 | + - containerPort: 53 |
| 153 | + name: dns-tcp |
| 154 | + protocol: TCP |
| 155 | + - containerPort: 9153 |
| 156 | + name: metrics |
| 157 | + protocol: TCP |
| 158 | + livenessProbe: |
| 159 | + httpGet: |
| 160 | + path: /health |
| 161 | + port: 8080 |
| 162 | + scheme: HTTP |
| 163 | + initialDelaySeconds: 60 |
| 164 | + timeoutSeconds: 5 |
| 165 | + successThreshold: 1 |
| 166 | + failureThreshold: 5 |
| 167 | + readinessProbe: |
| 168 | + httpGet: |
| 169 | + path: /ready |
| 170 | + port: 8181 |
| 171 | + scheme: HTTP |
| 172 | + securityContext: |
| 173 | + allowPrivilegeEscalation: false |
| 174 | + capabilities: |
| 175 | + add: |
| 176 | + - NET_BIND_SERVICE |
| 177 | + drop: |
| 178 | + - all |
| 179 | + readOnlyRootFilesystem: true |
| 180 | + dnsPolicy: Default |
| 181 | + volumes: |
| 182 | + - name: config-volume |
| 183 | + configMap: |
| 184 | + name: coredns |
| 185 | + items: |
| 186 | + - key: Corefile |
| 187 | + path: Corefile |
| 188 | +--- |
| 189 | +apiVersion: v1 |
| 190 | +kind: Service |
| 191 | +metadata: |
| 192 | + name: kube-dns |
| 193 | + namespace: kube-system |
| 194 | + annotations: |
| 195 | + prometheus.io/port: "9153" |
| 196 | + prometheus.io/scrape: "true" |
| 197 | + labels: |
| 198 | + k8s-app: kube-dns |
| 199 | + kubernetes.io/cluster-service: "true" |
| 200 | + addonmanager.kubernetes.io/mode: Reconcile |
| 201 | + kubernetes.io/name: "CoreDNS" |
| 202 | +spec: |
| 203 | + selector: |
| 204 | + k8s-app: kube-dns |
| 205 | + clusterIP: 'dns_server' |
| 206 | + ports: |
| 207 | + - name: dns |
| 208 | + port: 53 |
| 209 | + protocol: UDP |
| 210 | + - name: dns-tcp |
| 211 | + port: 53 |
| 212 | + protocol: TCP |
| 213 | + - name: metrics |
| 214 | + port: 9153 |
| 215 | + protocol: TCP |
0 commit comments