skydns-rc.yaml.base 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. # Copyright 2016 The Kubernetes Authors.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. # This file should be kept in sync with cluster/images/hyperkube/dns-rc.yaml
  15. # TODO - At some point, we need to rename all skydns-*.yaml.* files to kubedns-*.yaml.*
  16. # __MACHINE_GENERATED_WARNING__
  17. apiVersion: v1
  18. kind: ReplicationController
  19. metadata:
  20. name: kube-dns-v19
  21. namespace: kube-system
  22. labels:
  23. k8s-app: kube-dns
  24. version: v19
  25. kubernetes.io/cluster-service: "true"
  26. spec:
  27. replicas: __PILLAR__DNS__REPLICAS__
  28. selector:
  29. k8s-app: kube-dns
  30. version: v19
  31. template:
  32. metadata:
  33. labels:
  34. k8s-app: kube-dns
  35. version: v19
  36. kubernetes.io/cluster-service: "true"
  37. annotations:
  38. scheduler.alpha.kubernetes.io/critical-pod: ''
  39. scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]'
  40. spec:
  41. containers:
  42. - name: kubedns
  43. image: gcr.io/google_containers/kubedns-amd64:1.7
  44. resources:
  45. # TODO: Set memory limits when we've profiled the container for large
  46. # clusters, then set request = limit to keep this container in
  47. # guaranteed class. Currently, this container falls into the
  48. # "burstable" category so the kubelet doesn't backoff from restarting it.
  49. limits:
  50. cpu: 100m
  51. memory: 170Mi
  52. requests:
  53. cpu: 100m
  54. memory: 70Mi
  55. livenessProbe:
  56. httpGet:
  57. path: /healthz
  58. port: 8080
  59. scheme: HTTP
  60. initialDelaySeconds: 60
  61. timeoutSeconds: 5
  62. successThreshold: 1
  63. failureThreshold: 5
  64. readinessProbe:
  65. httpGet:
  66. path: /readiness
  67. port: 8081
  68. scheme: HTTP
  69. # we poll on pod startup for the Kubernetes master service and
  70. # only setup the /readiness HTTP server once that's available.
  71. initialDelaySeconds: 30
  72. timeoutSeconds: 5
  73. args:
  74. # command = "/kube-dns"
  75. - --domain=__PILLAR__DNS__DOMAIN__.
  76. - --dns-port=10053
  77. __PILLAR__FEDERATIONS__DOMAIN__MAP__
  78. ports:
  79. - containerPort: 10053
  80. name: dns-local
  81. protocol: UDP
  82. - containerPort: 10053
  83. name: dns-tcp-local
  84. protocol: TCP
  85. - name: dnsmasq
  86. image: gcr.io/google_containers/kube-dnsmasq-amd64:1.3
  87. args:
  88. - --cache-size=1000
  89. - --no-resolv
  90. - --server=127.0.0.1#10053
  91. ports:
  92. - containerPort: 53
  93. name: dns
  94. protocol: UDP
  95. - containerPort: 53
  96. name: dns-tcp
  97. protocol: TCP
  98. - name: healthz
  99. image: gcr.io/google_containers/exechealthz-amd64:1.1
  100. resources:
  101. # keep request = limit to keep this container in guaranteed class
  102. limits:
  103. cpu: 10m
  104. memory: 50Mi
  105. requests:
  106. cpu: 10m
  107. # Note that this container shouldn't really need 50Mi of memory. The
  108. # limits are set higher than expected pending investigation on #29688.
  109. # The extra memory was stolen from the kubedns container to keep the
  110. # net memory requested by the pod constant.
  111. memory: 50Mi
  112. args:
  113. - -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
  114. - -port=8080
  115. - -quiet
  116. ports:
  117. - containerPort: 8080
  118. protocol: TCP
  119. dnsPolicy: Default # Don't use cluster DNS.