deployment.yaml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. imagePullPolicy: IfNotPresent
  30. livenessProbe:
  31. failureThreshold: 5
  32. httpGet:
  33. path: /health
  34. port: 10054
  35. scheme: HTTP
  36. initialDelaySeconds: 60
  37. successThreshold: 1
  38. timeoutSeconds: 5
  39. name: coredns
  40. ports:
  41. - containerPort: 10053
  42. name: dns
  43. protocol: UDP
  44. - containerPort: 10053
  45. name: dns-tcp
  46. protocol: TCP
  47. - containerPort: 10055
  48. name: metrics
  49. protocol: TCP
  50. resources:
  51. limits:
  52. memory: "170Mi"
  53. requests:
  54. cpu: "100m"
  55. memory: "70Mi"
  56. securityContext:
  57. allowPrivilegeEscalation: false
  58. capabilities:
  59. drop:
  60. - all
  61. readOnlyRootFilesystem: true
  62. volumeMounts:
  63. - mountPath: /etc/coredns
  64. name: config-volume
  65. readOnly: true
  66. dnsPolicy: Default
  67. nodeSelector:
  68. kubernetes.io/os: linux
  69. serviceAccountName: coredns
  70. tolerations:
  71. - effect: NoSchedule
  72. key: node-role.kubernetes.io/master
  73. - key: CriticalAddonsOnly
  74. operator: Exists
  75. volumes:
  76. - configMap:
  77. items:
  78. - key: Corefile
  79. path: Corefile
  80. name: coredns
  81. name: config-volume