|
| 1 | +--- |
| 2 | +apiVersion: v1 |
| 3 | +kind: ConfigMap |
| 4 | +metadata: |
| 5 | + name: kube-dns |
| 6 | + namespace: kube-system |
| 7 | + labels: |
| 8 | + addonmanager.kubernetes.io/mode: EnsureExists |
| 9 | + |
| 10 | +--- |
| 11 | +apiVersion: v1 |
| 12 | +kind: ServiceAccount |
| 13 | +metadata: |
| 14 | + name: kube-dns |
| 15 | + namespace: kube-system |
| 16 | + labels: |
| 17 | + kubernetes.io/cluster-service: "true" |
| 18 | + addonmanager.kubernetes.io/mode: Reconcile |
| 19 | + |
| 20 | +--- |
| 21 | +apiVersion: v1 |
| 22 | +kind: Service |
| 23 | +metadata: |
| 24 | + name: kube-dns |
| 25 | + namespace: kube-system |
| 26 | + labels: |
| 27 | + k8s-app: kube-dns |
| 28 | + kubernetes.io/cluster-service: "true" |
| 29 | + addonmanager.kubernetes.io/mode: Reconcile |
| 30 | + kubernetes.io/name: "KubeDNS" |
| 31 | +spec: |
| 32 | + selector: |
| 33 | + k8s-app: kube-dns |
| 34 | + clusterIP: 10.68.0.2 |
| 35 | + ports: |
| 36 | + - name: dns |
| 37 | + port: 53 |
| 38 | + protocol: UDP |
| 39 | + - name: dns-tcp |
| 40 | + port: 53 |
| 41 | + protocol: TCP |
| 42 | + |
| 43 | +--- |
| 44 | +apiVersion: extensions/v1beta1 |
| 45 | +kind: Deployment |
| 46 | +metadata: |
| 47 | + name: kube-dns |
| 48 | + namespace: kube-system |
| 49 | + labels: |
| 50 | + k8s-app: kube-dns |
| 51 | + kubernetes.io/cluster-service: "true" |
| 52 | + addonmanager.kubernetes.io/mode: Reconcile |
| 53 | +spec: |
| 54 | + # replicas: not specified here: |
| 55 | + # 1. In order to make Addon Manager do not reconcile this replicas parameter. |
| 56 | + # 2. Default is 1. |
| 57 | + # 3. Will be tuned in real time if DNS horizontal auto-scaling is turned on. |
| 58 | + strategy: |
| 59 | + rollingUpdate: |
| 60 | + maxSurge: 10% |
| 61 | + maxUnavailable: 0 |
| 62 | + selector: |
| 63 | + matchLabels: |
| 64 | + k8s-app: kube-dns |
| 65 | + template: |
| 66 | + metadata: |
| 67 | + labels: |
| 68 | + k8s-app: kube-dns |
| 69 | + annotations: |
| 70 | + scheduler.alpha.kubernetes.io/critical-pod: '' |
| 71 | + spec: |
| 72 | + tolerations: |
| 73 | + - key: "CriticalAddonsOnly" |
| 74 | + operator: "Exists" |
| 75 | + volumes: |
| 76 | + - name: kube-dns-config |
| 77 | + configMap: |
| 78 | + name: kube-dns |
| 79 | + optional: true |
| 80 | + containers: |
| 81 | + - name: kubedns |
| 82 | + #image: gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.14.5 |
| 83 | + image: mirrorgooglecontainers/k8s-dns-kube-dns-amd64:1.14.5 |
| 84 | + resources: |
| 85 | + # TODO: Set memory limits when we've profiled the container for large |
| 86 | + # clusters, then set request = limit to keep this container in |
| 87 | + # guaranteed class. Currently, this container falls into the |
| 88 | + # "burstable" category so the kubelet doesn't backoff from restarting it. |
| 89 | + limits: |
| 90 | + memory: 170Mi |
| 91 | + requests: |
| 92 | + cpu: 100m |
| 93 | + memory: 70Mi |
| 94 | + livenessProbe: |
| 95 | + httpGet: |
| 96 | + path: /healthcheck/kubedns |
| 97 | + port: 10054 |
| 98 | + scheme: HTTP |
| 99 | + initialDelaySeconds: 60 |
| 100 | + timeoutSeconds: 5 |
| 101 | + successThreshold: 1 |
| 102 | + failureThreshold: 5 |
| 103 | + readinessProbe: |
| 104 | + httpGet: |
| 105 | + path: /readiness |
| 106 | + port: 8081 |
| 107 | + scheme: HTTP |
| 108 | + # we poll on pod startup for the Kubernetes master service and |
| 109 | + # only setup the /readiness HTTP server once that's available. |
| 110 | + initialDelaySeconds: 3 |
| 111 | + timeoutSeconds: 5 |
| 112 | + args: |
| 113 | + - --domain=cluster.local. |
| 114 | + - --dns-port=10053 |
| 115 | + - --config-dir=/kube-dns-config |
| 116 | + - --v=2 |
| 117 | + env: |
| 118 | + - name: PROMETHEUS_PORT |
| 119 | + value: "10055" |
| 120 | + ports: |
| 121 | + - containerPort: 10053 |
| 122 | + name: dns-local |
| 123 | + protocol: UDP |
| 124 | + - containerPort: 10053 |
| 125 | + name: dns-tcp-local |
| 126 | + protocol: TCP |
| 127 | + - containerPort: 10055 |
| 128 | + name: metrics |
| 129 | + protocol: TCP |
| 130 | + volumeMounts: |
| 131 | + - name: kube-dns-config |
| 132 | + mountPath: /kube-dns-config |
| 133 | + - name: dnsmasq |
| 134 | + #image: gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64:1.14.5 |
| 135 | + image: mirrorgooglecontainers/k8s-dns-dnsmasq-nanny-amd64:1.14.5 |
| 136 | + livenessProbe: |
| 137 | + httpGet: |
| 138 | + path: /healthcheck/dnsmasq |
| 139 | + port: 10054 |
| 140 | + scheme: HTTP |
| 141 | + initialDelaySeconds: 60 |
| 142 | + timeoutSeconds: 5 |
| 143 | + successThreshold: 1 |
| 144 | + failureThreshold: 5 |
| 145 | + args: |
| 146 | + - -v=2 |
| 147 | + - -logtostderr |
| 148 | + - -configDir=/etc/k8s/dns/dnsmasq-nanny |
| 149 | + - -restartDnsmasq=true |
| 150 | + - -- |
| 151 | + - -k |
| 152 | + - --cache-size=1000 |
| 153 | + - --log-facility=- |
| 154 | + - --server=/cluster.local./127.0.0.1#10053 |
| 155 | + - --server=/in-addr.arpa/127.0.0.1#10053 |
| 156 | + - --server=/ip6.arpa/127.0.0.1#10053 |
| 157 | + ports: |
| 158 | + - containerPort: 53 |
| 159 | + name: dns |
| 160 | + protocol: UDP |
| 161 | + - containerPort: 53 |
| 162 | + name: dns-tcp |
| 163 | + protocol: TCP |
| 164 | + # see: https://github.com/kubernetes/kubernetes/issues/29055 for details |
| 165 | + resources: |
| 166 | + requests: |
| 167 | + cpu: 150m |
| 168 | + memory: 20Mi |
| 169 | + volumeMounts: |
| 170 | + - name: kube-dns-config |
| 171 | + mountPath: /etc/k8s/dns/dnsmasq-nanny |
| 172 | + - name: sidecar |
| 173 | + #image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.14.5 |
| 174 | + image: mirrorgooglecontainers/k8s-dns-sidecar-amd64:1.14.5 |
| 175 | + livenessProbe: |
| 176 | + httpGet: |
| 177 | + path: /metrics |
| 178 | + port: 10054 |
| 179 | + scheme: HTTP |
| 180 | + initialDelaySeconds: 60 |
| 181 | + timeoutSeconds: 5 |
| 182 | + successThreshold: 1 |
| 183 | + failureThreshold: 5 |
| 184 | + args: |
| 185 | + - --v=2 |
| 186 | + - --logtostderr |
| 187 | + - --probe=kubedns,127.0.0.1:10053,kubernetes.default.svc.cluster.local.,5,A |
| 188 | + - --probe=dnsmasq,127.0.0.1:53,kubernetes.default.svc.cluster.local.,5,A |
| 189 | + ports: |
| 190 | + - containerPort: 10054 |
| 191 | + name: metrics |
| 192 | + protocol: TCP |
| 193 | + resources: |
| 194 | + requests: |
| 195 | + memory: 20Mi |
| 196 | + cpu: 10m |
| 197 | + dnsPolicy: Default # Don't use cluster DNS. |
| 198 | + serviceAccountName: kube-dns |
0 commit comments