mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #32406 from MrHohn/kubedns-healthz
Automatic merge from submit-queue Split dns healthcheck into two different urls Attempt to fix #30633. <s>This new kube-dns pod template creates two exechealthz processes listen on two different ports for kubedns and dnsmasq correspondingly. @thockin @girishkalele
This commit is contained in:
		@@ -35,7 +35,6 @@ spec:
 | 
			
		||||
      labels:
 | 
			
		||||
        k8s-app: kube-dns
 | 
			
		||||
        version: v19
 | 
			
		||||
        kubernetes.io/cluster-service: "true"
 | 
			
		||||
      annotations:
 | 
			
		||||
        scheduler.alpha.kubernetes.io/critical-pod: ''
 | 
			
		||||
        scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]'
 | 
			
		||||
@@ -55,7 +54,7 @@ spec:
 | 
			
		||||
            memory: 70Mi
 | 
			
		||||
        livenessProbe:
 | 
			
		||||
          httpGet:
 | 
			
		||||
            path: /healthz
 | 
			
		||||
            path: /healthz-kubedns
 | 
			
		||||
            port: 8080
 | 
			
		||||
            scheme: HTTP
 | 
			
		||||
          initialDelaySeconds: 60
 | 
			
		||||
@@ -85,6 +84,15 @@ spec:
 | 
			
		||||
          protocol: TCP
 | 
			
		||||
      - name: dnsmasq
 | 
			
		||||
        image: gcr.io/google_containers/kube-dnsmasq-amd64:1.3
 | 
			
		||||
        livenessProbe:
 | 
			
		||||
          httpGet:
 | 
			
		||||
            path: /healthz-dnsmasq
 | 
			
		||||
            port: 8080
 | 
			
		||||
            scheme: HTTP
 | 
			
		||||
          initialDelaySeconds: 60
 | 
			
		||||
          timeoutSeconds: 5
 | 
			
		||||
          successThreshold: 1
 | 
			
		||||
          failureThreshold: 5
 | 
			
		||||
        args:
 | 
			
		||||
        - --cache-size=1000
 | 
			
		||||
        - --no-resolv
 | 
			
		||||
@@ -98,7 +106,7 @@ spec:
 | 
			
		||||
          name: dns-tcp
 | 
			
		||||
          protocol: TCP
 | 
			
		||||
      - name: healthz
 | 
			
		||||
        image: gcr.io/google_containers/exechealthz-amd64:1.1
 | 
			
		||||
        image: gcr.io/google_containers/exechealthz-amd64:1.2
 | 
			
		||||
        resources:
 | 
			
		||||
          limits:
 | 
			
		||||
            memory: 50Mi
 | 
			
		||||
@@ -110,9 +118,12 @@ spec:
 | 
			
		||||
            # net memory requested by the pod constant.
 | 
			
		||||
            memory: 50Mi
 | 
			
		||||
        args:
 | 
			
		||||
        - -cmd=nslookup kubernetes.default.svc.__PILLAR__DNS__DOMAIN__ 127.0.0.1 >/dev/null && nslookup kubernetes.default.svc.__PILLAR__DNS__DOMAIN__ 127.0.0.1:10053 >/dev/null
 | 
			
		||||
        - -port=8080
 | 
			
		||||
        - -quiet
 | 
			
		||||
        - --cmd=nslookup kubernetes.default.svc.__PILLAR__DNS__DOMAIN__ 127.0.0.1 >/dev/null
 | 
			
		||||
        - --url=/healthz-dnsmasq
 | 
			
		||||
        - --cmd=nslookup kubernetes.default.svc.__PILLAR__DNS__DOMAIN__ 127.0.0.1:10053 >/dev/null
 | 
			
		||||
        - --url=/healthz-kubedns
 | 
			
		||||
        - --port=8080
 | 
			
		||||
        - --quiet
 | 
			
		||||
        ports:
 | 
			
		||||
        - containerPort: 8080
 | 
			
		||||
          protocol: TCP
 | 
			
		||||
 
 | 
			
		||||
@@ -55,7 +55,7 @@ spec:
 | 
			
		||||
            memory: 70Mi
 | 
			
		||||
        livenessProbe:
 | 
			
		||||
          httpGet:
 | 
			
		||||
            path: /healthz
 | 
			
		||||
            path: /healthz-kubedns
 | 
			
		||||
            port: 8080
 | 
			
		||||
            scheme: HTTP
 | 
			
		||||
          initialDelaySeconds: 60
 | 
			
		||||
@@ -97,8 +97,17 @@ spec:
 | 
			
		||||
        - containerPort: 53
 | 
			
		||||
          name: dns-tcp
 | 
			
		||||
          protocol: TCP
 | 
			
		||||
        livenessProbe:
 | 
			
		||||
          httpGet:
 | 
			
		||||
            path: /healthz-dnsmasq
 | 
			
		||||
            port: 8080
 | 
			
		||||
            scheme: HTTP
 | 
			
		||||
          initialDelaySeconds: 60
 | 
			
		||||
          timeoutSeconds: 5
 | 
			
		||||
          successThreshold: 1
 | 
			
		||||
          failureThreshold: 5
 | 
			
		||||
      - name: healthz
 | 
			
		||||
        image: gcr.io/google_containers/exechealthz-amd64:1.1
 | 
			
		||||
        image: gcr.io/google_containers/exechealthz-amd64:1.2
 | 
			
		||||
        resources:
 | 
			
		||||
          limits:
 | 
			
		||||
            memory: 50Mi
 | 
			
		||||
@@ -110,9 +119,12 @@ spec:
 | 
			
		||||
            # net memory requested by the pod constant.
 | 
			
		||||
            memory: 50Mi
 | 
			
		||||
        args:
 | 
			
		||||
        - -cmd=nslookup kubernetes.default.svc.{{ pillar['dns_domain'] }} 127.0.0.1 >/dev/null && nslookup kubernetes.default.svc.{{ pillar['dns_domain'] }} 127.0.0.1:10053 >/dev/null
 | 
			
		||||
        - -port=8080
 | 
			
		||||
        - -quiet
 | 
			
		||||
        - --cmd=nslookup kubernetes.default.svc.{{ pillar['dns_domain'] }} 127.0.0.1 >/dev/null
 | 
			
		||||
        - --url=/healthz-dnsmasq
 | 
			
		||||
        - --cmd=nslookup kubernetes.default.svc.{{ pillar['dns_domain'] }} 127.0.0.1:10053 >/dev/null
 | 
			
		||||
        - --url=/healthz-kubedns
 | 
			
		||||
        - --port=8080
 | 
			
		||||
        - --quiet
 | 
			
		||||
        ports:
 | 
			
		||||
        - containerPort: 8080
 | 
			
		||||
          protocol: TCP
 | 
			
		||||
 
 | 
			
		||||
@@ -55,7 +55,7 @@ spec:
 | 
			
		||||
            memory: 70Mi
 | 
			
		||||
        livenessProbe:
 | 
			
		||||
          httpGet:
 | 
			
		||||
            path: /healthz
 | 
			
		||||
            path: /healthz-kubedns
 | 
			
		||||
            port: 8080
 | 
			
		||||
            scheme: HTTP
 | 
			
		||||
          initialDelaySeconds: 60
 | 
			
		||||
@@ -96,8 +96,17 @@ spec:
 | 
			
		||||
        - containerPort: 53
 | 
			
		||||
          name: dns-tcp
 | 
			
		||||
          protocol: TCP
 | 
			
		||||
        livenessProbe:
 | 
			
		||||
          httpGet:
 | 
			
		||||
            path: /healthz-dnsmasq
 | 
			
		||||
            port: 8080
 | 
			
		||||
            scheme: HTTP
 | 
			
		||||
          initialDelaySeconds: 60
 | 
			
		||||
          timeoutSeconds: 5
 | 
			
		||||
          successThreshold: 1
 | 
			
		||||
          failureThreshold: 5
 | 
			
		||||
      - name: healthz
 | 
			
		||||
        image: gcr.io/google_containers/exechealthz-amd64:1.1
 | 
			
		||||
        image: gcr.io/google_containers/exechealthz-amd64:1.2
 | 
			
		||||
        resources:
 | 
			
		||||
          limits:
 | 
			
		||||
            memory: 50Mi
 | 
			
		||||
@@ -109,9 +118,12 @@ spec:
 | 
			
		||||
            # net memory requested by the pod constant.
 | 
			
		||||
            memory: 50Mi
 | 
			
		||||
        args:
 | 
			
		||||
        - -cmd=nslookup kubernetes.default.svc.$DNS_DOMAIN 127.0.0.1 >/dev/null && nslookup kubernetes.default.svc.$DNS_DOMAIN 127.0.0.1:10053 >/dev/null
 | 
			
		||||
        - -port=8080
 | 
			
		||||
        - -quiet
 | 
			
		||||
        - --cmd=nslookup kubernetes.default.svc.$DNS_DOMAIN 127.0.0.1 >/dev/null
 | 
			
		||||
        - --url=/healthz-dnsmasq
 | 
			
		||||
        - --cmd=nslookup kubernetes.default.svc.$DNS_DOMAIN 127.0.0.1:10053 >/dev/null
 | 
			
		||||
        - --url=/healthz-kubedns
 | 
			
		||||
        - --port=8080
 | 
			
		||||
        - --quiet
 | 
			
		||||
        ports:
 | 
			
		||||
        - containerPort: 8080
 | 
			
		||||
          protocol: TCP
 | 
			
		||||
 
 | 
			
		||||
@@ -1,23 +1,25 @@
 | 
			
		||||
apiVersion: v1
 | 
			
		||||
kind: ReplicationController
 | 
			
		||||
metadata:
 | 
			
		||||
  name: kube-dns-v15
 | 
			
		||||
  name: kube-dns-v19
 | 
			
		||||
  namespace: kube-system
 | 
			
		||||
  labels:
 | 
			
		||||
    k8s-app: kube-dns
 | 
			
		||||
    version: v15
 | 
			
		||||
    version: v19
 | 
			
		||||
    kubernetes.io/cluster-service: "true"
 | 
			
		||||
spec:
 | 
			
		||||
  replicas: ${DNS_REPLICAS}
 | 
			
		||||
  selector:
 | 
			
		||||
    k8s-app: kube-dns
 | 
			
		||||
    version: v15
 | 
			
		||||
    version: v19
 | 
			
		||||
  template:
 | 
			
		||||
    metadata:
 | 
			
		||||
      labels:
 | 
			
		||||
        k8s-app: kube-dns
 | 
			
		||||
        version: v15
 | 
			
		||||
        kubernetes.io/cluster-service: "true"
 | 
			
		||||
        version: v19
 | 
			
		||||
      annotations:
 | 
			
		||||
        scheduler.alpha.kubernetes.io/critical-pod: ''
 | 
			
		||||
        scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]'
 | 
			
		||||
    spec:
 | 
			
		||||
      containers:
 | 
			
		||||
      - name: kubedns
 | 
			
		||||
@@ -28,14 +30,13 @@ spec:
 | 
			
		||||
          # guaranteed class. Currently, this container falls into the
 | 
			
		||||
          # "burstable" category so the kubelet doesn't backoff from restarting it.
 | 
			
		||||
          limits:
 | 
			
		||||
            cpu: 100m
 | 
			
		||||
            memory: 200Mi
 | 
			
		||||
          requests:
 | 
			
		||||
            cpu: 100m
 | 
			
		||||
            memory: 100Mi
 | 
			
		||||
        livenessProbe:
 | 
			
		||||
          httpGet:
 | 
			
		||||
            path: /healthz
 | 
			
		||||
            path: /healthz-kubedns
 | 
			
		||||
            port: 8080
 | 
			
		||||
            scheme: HTTP
 | 
			
		||||
          initialDelaySeconds: 60
 | 
			
		||||
@@ -63,7 +64,16 @@ spec:
 | 
			
		||||
          name: dns-tcp-local
 | 
			
		||||
          protocol: TCP
 | 
			
		||||
      - name: dnsmasq
 | 
			
		||||
        image: gcr.io/google_containers/dnsmasq:1.1
 | 
			
		||||
        image: gcr.io/google_containers/dnsmasq:1.3
 | 
			
		||||
        livenessProbe:
 | 
			
		||||
          httpGet:
 | 
			
		||||
            path: /healthz-dnsmasq
 | 
			
		||||
            port: 8080
 | 
			
		||||
            scheme: HTTP
 | 
			
		||||
          initialDelaySeconds: 60
 | 
			
		||||
          timeoutSeconds: 5
 | 
			
		||||
          successThreshold: 1
 | 
			
		||||
          failureThreshold: 5
 | 
			
		||||
        args:
 | 
			
		||||
        - --cache-size=1000
 | 
			
		||||
        - --no-resolv
 | 
			
		||||
@@ -77,18 +87,24 @@ spec:
 | 
			
		||||
          name: dns-tcp
 | 
			
		||||
          protocol: TCP
 | 
			
		||||
      - name: healthz
 | 
			
		||||
        image: gcr.io/google_containers/exechealthz-amd64:1.0
 | 
			
		||||
        image: gcr.io/google_containers/exechealthz-amd64:1.2
 | 
			
		||||
        resources:
 | 
			
		||||
          # keep request = limit to keep this container in guaranteed class
 | 
			
		||||
          limits:
 | 
			
		||||
            cpu: 10m
 | 
			
		||||
            memory: 20Mi
 | 
			
		||||
            memory: 50Mi
 | 
			
		||||
          requests:
 | 
			
		||||
            cpu: 10m
 | 
			
		||||
            memory: 20Mi
 | 
			
		||||
            # Note that this container shouldn't really need 50Mi of memory. The
 | 
			
		||||
            # limits are set higher than expected pending investigation on #29688.
 | 
			
		||||
            # The extra memory was stolen from the kubedns container to keep the
 | 
			
		||||
            # net memory requested by the pod constant.
 | 
			
		||||
            memory: 50Mi
 | 
			
		||||
        args:
 | 
			
		||||
        - -cmd=nslookup kubernetes.default.svc.${DNS_DOMAIN} 127.0.0.1 >/dev/null
 | 
			
		||||
        - -port=8080
 | 
			
		||||
        - --cmd=nslookup kubernetes.default.svc.${DNS_DOMAIN} 127.0.0.1 >/dev/null
 | 
			
		||||
        - --url=/healthz-dnsmasq
 | 
			
		||||
        - --cmd=nslookup kubernetes.default.svc.${DNS_DOMAIN} 127.0.0.1:10053 >/dev/null
 | 
			
		||||
        - --url=/healthz-kubedns
 | 
			
		||||
        - --port=8080
 | 
			
		||||
        - --quiet
 | 
			
		||||
        ports:
 | 
			
		||||
        - containerPort: 8080
 | 
			
		||||
          protocol: TCP
 | 
			
		||||
 
 | 
			
		||||
@@ -12,30 +12,30 @@
 | 
			
		||||
# See the License for the specific language governing permissions and
 | 
			
		||||
# limitations under the License.
 | 
			
		||||
 | 
			
		||||
# This file should be kept in sync with cluster/images/hyperkube/dns-rc.yaml
 | 
			
		||||
 | 
			
		||||
# Warning: This is a file generated from the base underscore template file: skydns-rc.yaml.base
 | 
			
		||||
 | 
			
		||||
apiVersion: v1
 | 
			
		||||
kind: ReplicationController
 | 
			
		||||
metadata:
 | 
			
		||||
  name: kube-dns-v18
 | 
			
		||||
  name: kube-dns-v19
 | 
			
		||||
  namespace: kube-system
 | 
			
		||||
  labels:
 | 
			
		||||
    k8s-app: kube-dns
 | 
			
		||||
    version: v18
 | 
			
		||||
    version: v19
 | 
			
		||||
    kubernetes.io/cluster-service: "true"
 | 
			
		||||
spec:
 | 
			
		||||
  replicas: {{ pillar['dns_replicas'] }}
 | 
			
		||||
  selector:
 | 
			
		||||
    k8s-app: kube-dns
 | 
			
		||||
    version: v18
 | 
			
		||||
    version: v19
 | 
			
		||||
  template:
 | 
			
		||||
    metadata:
 | 
			
		||||
      labels:
 | 
			
		||||
        k8s-app: kube-dns
 | 
			
		||||
        version: v18
 | 
			
		||||
        kubernetes.io/cluster-service: "true"
 | 
			
		||||
        version: v19
 | 
			
		||||
      annotations:
 | 
			
		||||
        scheduler.alpha.kubernetes.io/critical-pod: ''
 | 
			
		||||
        scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]'
 | 
			
		||||
    spec:
 | 
			
		||||
      containers:
 | 
			
		||||
      - name: kubedns
 | 
			
		||||
@@ -46,14 +46,13 @@ spec:
 | 
			
		||||
          # guaranteed class. Currently, this container falls into the
 | 
			
		||||
          # "burstable" category so the kubelet doesn't backoff from restarting it.
 | 
			
		||||
          limits:
 | 
			
		||||
            cpu: 100m
 | 
			
		||||
            memory: 200Mi
 | 
			
		||||
          requests:
 | 
			
		||||
            cpu: 100m
 | 
			
		||||
            memory: 100Mi
 | 
			
		||||
        livenessProbe:
 | 
			
		||||
          httpGet:
 | 
			
		||||
            path: /healthz
 | 
			
		||||
            path: /healthz-kubedns
 | 
			
		||||
            port: 8080
 | 
			
		||||
            scheme: HTTP
 | 
			
		||||
          initialDelaySeconds: 60
 | 
			
		||||
@@ -84,6 +83,15 @@ spec:
 | 
			
		||||
          protocol: TCP
 | 
			
		||||
      - name: dnsmasq
 | 
			
		||||
        image: gcr.io/google_containers/kube-dnsmasq-{{ arch }}:1.3
 | 
			
		||||
        livenessProbe:
 | 
			
		||||
          httpGet:
 | 
			
		||||
            path: /healthz-dnsmasq
 | 
			
		||||
            port: 8080
 | 
			
		||||
            scheme: HTTP
 | 
			
		||||
          initialDelaySeconds: 60
 | 
			
		||||
          timeoutSeconds: 5
 | 
			
		||||
          successThreshold: 1
 | 
			
		||||
          failureThreshold: 5
 | 
			
		||||
        args:
 | 
			
		||||
        - --cache-size=1000
 | 
			
		||||
        - --no-resolv
 | 
			
		||||
@@ -97,19 +105,24 @@ spec:
 | 
			
		||||
          name: dns-tcp
 | 
			
		||||
          protocol: TCP
 | 
			
		||||
      - name: healthz
 | 
			
		||||
        image: gcr.io/google_containers/exechealthz-{{ arch }}:1.0
 | 
			
		||||
        image: gcr.io/google_containers/exechealthz-{{ arch }}:1.2
 | 
			
		||||
        resources:
 | 
			
		||||
          # keep request = limit to keep this container in guaranteed class
 | 
			
		||||
          limits:
 | 
			
		||||
            cpu: 10m
 | 
			
		||||
            memory: 20Mi
 | 
			
		||||
            memory: 50Mi
 | 
			
		||||
          requests:
 | 
			
		||||
            cpu: 10m
 | 
			
		||||
            memory: 20Mi
 | 
			
		||||
            # Note that this container shouldn't really need 50Mi of memory. The
 | 
			
		||||
            # limits are set higher than expected pending investigation on #29688.
 | 
			
		||||
            # The extra memory was stolen from the kubedns container to keep the
 | 
			
		||||
            # net memory requested by the pod constant.
 | 
			
		||||
            memory: 50Mi
 | 
			
		||||
        args:
 | 
			
		||||
        - -cmd=nslookup kubernetes.default.svc.{{ pillar['dns_domain'] }} 127.0.0.1 >/dev/null && nslookup kubernetes.default.svc.{{ pillar['dns_domain'] }} 127.0.0.1:10053 >/dev/null
 | 
			
		||||
        - -port=8080
 | 
			
		||||
        - -quiet
 | 
			
		||||
        - --cmd=nslookup kubernetes.default.svc.{{ pillar['dns_domain'] }} 127.0.0.1 >/dev/null
 | 
			
		||||
        - --url=/healthz-dnsmasq
 | 
			
		||||
        - --cmd=nslookup kubernetes.default.svc.{{ pillar['dns_domain'] }} 127.0.0.1:10053 >/dev/null
 | 
			
		||||
        - --url=/healthz-kubedns
 | 
			
		||||
        - --port=8080
 | 
			
		||||
        - --quiet
 | 
			
		||||
        ports:
 | 
			
		||||
        - containerPort: 8080
 | 
			
		||||
          protocol: TCP
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user