deployment.yaml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. labels:
  5. addonmanager.kubernetes.io/mode: Reconcile
  6. k8s-app: kube-dns
  7. kubernetes.io/cluster-service: 'true'
  8. kubernetes.io/name: CoreDNS
  9. name: coredns
  10. namespace: kube-system
  11. spec:
  12. selector:
  13. matchLabels:
  14. k8s-app: kube-dns
  15. strategy:
  16. rollingUpdate:
  17. maxUnavailable: 1
  18. type: RollingUpdate
  19. template:
  20. metadata:
  21. labels:
  22. k8s-app: kube-dns
  23. spec:
  24. containers:
  25. - args:
  26. - "-conf"
  27. - /etc/coredns/Corefile
  28. image: coredns/coredns:1.7.1
  29. # XXX: Kubelet wrapper script loads image, but gc will delete it.
  30. # imagePullPolicy: Never
  31. livenessProbe:
  32. failureThreshold: 5
  33. httpGet:
  34. path: /health
  35. port: 10054
  36. scheme: HTTP
  37. initialDelaySeconds: 60
  38. successThreshold: 1
  39. timeoutSeconds: 5
  40. name: coredns
  41. ports:
  42. - containerPort: 10053
  43. name: dns
  44. protocol: UDP
  45. - containerPort: 10053
  46. name: dns-tcp
  47. protocol: TCP
  48. - containerPort: 10055
  49. name: metrics
  50. protocol: TCP
  51. resources:
  52. limits:
  53. memory: "170Mi"
  54. requests:
  55. cpu: "100m"
  56. memory: "70Mi"
  57. securityContext:
  58. allowPrivilegeEscalation: false
  59. capabilities:
  60. drop:
  61. - all
  62. readOnlyRootFilesystem: true
  63. volumeMounts:
  64. - mountPath: /etc/coredns
  65. name: config-volume
  66. readOnly: true
  67. dnsPolicy: Default
  68. nodeSelector:
  69. kubernetes.io/os: linux
  70. serviceAccountName: coredns
  71. tolerations:
  72. - effect: NoSchedule
  73. key: node-role.kubernetes.io/master
  74. - key: CriticalAddonsOnly
  75. operator: Exists
  76. volumes:
  77. - configMap:
  78. items:
  79. - key: Corefile
  80. path: Corefile
  81. name: coredns
  82. name: config-volume