github.phpd.cn/cilium/cilium@v1.6.12/test/provision/manifest/kubedns_deployment.yaml (about)

     1  ---
     2  apiVersion: v1
     3  kind: Service
     4  metadata:
     5    name: kube-dns
     6    namespace: kube-system
     7    # Without this resourceVersion value, an update of the Service between versions will yield:
     8    #   Service "kube-dns" is invalid: metadata.resourceVersion: Invalid value: "": must be specified for an update
     9    resourceVersion: "0"
    10    labels:
    11      k8s-app: kube-dns
    12      kubernetes.io/cluster-service: "true"
    13      kubernetes.io/name: "KubeDNS"
    14  spec:
    15    selector:
    16      k8s-app: kube-dns
    17    clusterIP: 10.96.0.10
    18    ports:
    19    - name: dns
    20      port: 53
    21      protocol: UDP
    22    - name: dns-tcp
    23      port: 53
    24      protocol: TCP
    25  ---
    26  apiVersion: v1
    27  kind: ServiceAccount
    28  metadata:
    29    name: kube-dns
    30    namespace: kube-system
    31    labels:
    32      kubernetes.io/cluster-service: "true"
    33      addonmanager.kubernetes.io/mode: Reconcile
    34  ---
    35  apiVersion: v1
    36  kind: ConfigMap
    37  metadata:
    38    name: kube-dns
    39    namespace: kube-system
    40    labels:
    41      addonmanager.kubernetes.io/mode: EnsureExists
    42  data:
    43    stubDomains: |
    44      {"cilium.test": ["10.96.0.100"]}
    45  ---
    46  apiVersion: apps/v1
    47  kind: Deployment
    48  metadata:
    49    generation: 1
    50    labels:
    51      k8s-app: kube-dns
    52    name: kube-dns
    53    namespace: kube-system
    54  spec:
    55    replicas: 1
    56    selector:
    57      matchLabels:
    58        k8s-app: kube-dns
    59    strategy:
    60      rollingUpdate:
    61        maxSurge: 10%
    62        maxUnavailable: 0
    63      type: RollingUpdate
    64    template:
    65      metadata:
    66        creationTimestamp: null
    67        labels:
    68          k8s-app: kube-dns
    69      spec:
    70        affinity:
    71          nodeAffinity:
    72            requiredDuringSchedulingIgnoredDuringExecution:
    73              nodeSelectorTerms:
    74              - matchExpressions:
    75                - key: beta.kubernetes.io/arch
    76                  operator: In
    77                  values:
    78                  - amd64
    79        containers:
    80        - args:
    81          - --domain=cluster.local.
    82          - --dns-port=10053
    83          - --config-dir=/kube-dns-config
    84          - --v=5
    85          env:
    86          - name: PROMETHEUS_PORT
    87            value: "10055"
    88          image: gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.14.10
    89          imagePullPolicy: IfNotPresent
    90          livenessProbe:
    91            failureThreshold: 5
    92            httpGet:
    93              path: /healthcheck/kubedns
    94              port: 10054
    95              scheme: HTTP
    96            initialDelaySeconds: 60
    97            periodSeconds: 10
    98            successThreshold: 1
    99            timeoutSeconds: 5
   100          name: kubedns
   101          ports:
   102          - containerPort: 10053
   103            name: dns-local
   104            protocol: UDP
   105          - containerPort: 10053
   106            name: dns-tcp-local
   107            protocol: TCP
   108          - containerPort: 10055
   109            name: metrics
   110            protocol: TCP
   111          readinessProbe:
   112            failureThreshold: 3
   113            httpGet:
   114              path: /readiness
   115              port: 8081
   116              scheme: HTTP
   117            initialDelaySeconds: 3
   118            periodSeconds: 10
   119            successThreshold: 1
   120            timeoutSeconds: 5
   121          terminationMessagePath: /dev/termination-log
   122          terminationMessagePolicy: File
   123          volumeMounts:
   124          - mountPath: /kube-dns-config
   125            name: kube-dns-config
   126        - args:
   127          - -v=2
   128          - -logtostderr
   129          - -configDir=/etc/k8s/dns/dnsmasq-nanny
   130          - -restartDnsmasq=true
   131          - --
   132          - -k
   133          - --cache-size=1000
   134          - --log-facility=-
   135          - --server=/cluster.local/127.0.0.1#10053
   136          - --server=/in-addr.arpa/127.0.0.1#10053
   137          - --server=/ip6.arpa/127.0.0.1#10053
   138          image: gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64:1.14.10
   139          imagePullPolicy: IfNotPresent
   140          livenessProbe:
   141            failureThreshold: 5
   142            httpGet:
   143              path: /healthcheck/dnsmasq
   144              port: 10054
   145              scheme: HTTP
   146            initialDelaySeconds: 60
   147            periodSeconds: 10
   148            successThreshold: 1
   149            timeoutSeconds: 5
   150          name: dnsmasq
   151          ports:
   152          - containerPort: 53
   153            name: dns
   154            protocol: UDP
   155          - containerPort: 53
   156            name: dns-tcp
   157            protocol: TCP
   158          terminationMessagePath: /dev/termination-log
   159          terminationMessagePolicy: File
   160          volumeMounts:
   161          - mountPath: /etc/k8s/dns/dnsmasq-nanny
   162            name: kube-dns-config
   163        - args:
   164          - --v=2
   165          - --logtostderr
   166          - --probe=kubedns,127.0.0.1:10053,kubernetes.default.svc.cluster.local,5,A
   167          - --probe=dnsmasq,127.0.0.1:53,kubernetes.default.svc.cluster.local,5,A
   168          image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.14.10
   169          imagePullPolicy: IfNotPresent
   170          livenessProbe:
   171            failureThreshold: 5
   172            httpGet:
   173              path: /metrics
   174              port: 10054
   175              scheme: HTTP
   176            initialDelaySeconds: 60
   177            periodSeconds: 10
   178            successThreshold: 1
   179            timeoutSeconds: 5
   180          name: sidecar
   181          ports:
   182          - containerPort: 10054
   183            name: metrics
   184            protocol: TCP
   185          terminationMessagePath: /dev/termination-log
   186          terminationMessagePolicy: File
   187        dnsPolicy: Default
   188        restartPolicy: Always
   189        schedulerName: default-scheduler
   190        securityContext: {}
   191        serviceAccount: kube-dns
   192        serviceAccountName: kube-dns
   193        terminationGracePeriodSeconds: 30
   194        tolerations:
   195        - key: CriticalAddonsOnly
   196          operator: Exists
   197        - effect: NoSchedule
   198          key: node-role.kubernetes.io/master
   199        volumes:
   200        - configMap:
   201            defaultMode: 420
   202            name: kube-dns
   203            optional: true
   204          name: kube-dns-config