github.com/googlecloudplatform/kubernetes-workshops@v0.0.0-20180501174420-d8199445b2c3/bring-up/skydns.yaml (about)

     1  apiVersion: v1
     2  kind: Service
     3  metadata:
     4    name: kube-dns
     5    labels:
     6      k8s-app: kube-dns
     7      kubernetes.io/cluster-service: "true"
     8      kubernetes.io/name: "KubeDNS"
     9  spec:
    10    selector:
    11      k8s-app: kube-dns
    12    clusterIP:  10.0.0.10
    13    ports:
    14    - name: dns
    15      port: 53
    16      protocol: UDP
    17    - name: dns-tcp
    18      port: 53
    19      protocol: TCP
    20  ---
    21  apiVersion: v1
    22  kind: ReplicationController
    23  metadata:
    24    name: kube-dns-v11
    25    labels:
    26      k8s-app: kube-dns
    27      version: v11
    28      kubernetes.io/cluster-service: "true"
    29  spec:
    30    replicas: 1
    31    selector:
    32      k8s-app: kube-dns
    33      version: v11
    34    template:
    35      metadata:
    36        labels:
    37          k8s-app: kube-dns
    38          version: v11
    39          kubernetes.io/cluster-service: "true"
    40      spec:
    41        containers:
    42        - name: etcd
    43          image: gcr.io/google_containers/etcd-amd64:2.2.1
    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: 500Mi
    52            requests:
    53              cpu: 100m
    54              memory: 50Mi
    55          command:
    56          - /usr/local/bin/etcd
    57          - -data-dir
    58          - /var/etcd/data
    59          - -listen-client-urls
    60          - http://127.0.0.1:2379,http://127.0.0.1:4001
    61          - -advertise-client-urls
    62          - http://127.0.0.1:2379,http://127.0.0.1:4001
    63          - -initial-cluster-token
    64          - skydns-etcd
    65          volumeMounts:
    66          - name: etcd-storage
    67            mountPath: /var/etcd/data
    68        - name: kube2sky
    69          image: gcr.io/google_containers/kube2sky:1.14
    70          resources:
    71            # TODO: Set memory limits when we've profiled the container for large
    72            # clusters, then set request = limit to keep this container in
    73            # guaranteed class. Currently, this container falls into the
    74            # "burstable" category so the kubelet doesn't backoff from restarting it.
    75            limits:
    76              cpu: 100m
    77              # Kube2sky watches all pods.
    78              memory: 200Mi
    79            requests:
    80              cpu: 100m
    81              memory: 50Mi
    82          livenessProbe:
    83            httpGet:
    84              path: /healthz
    85              port: 8080
    86              scheme: HTTP
    87            initialDelaySeconds: 60
    88            timeoutSeconds: 5
    89            successThreshold: 1
    90            failureThreshold: 5
    91          readinessProbe:
    92            httpGet:
    93              path: /readiness
    94              port: 8081
    95              scheme: HTTP
    96            # we poll on pod startup for the Kubernetes master service and
    97            # only setup the /readiness HTTP server once that's available.
    98            initialDelaySeconds: 30
    99            timeoutSeconds: 5
   100          args:
   101          # command = "/kube2sky"
   102          - --domain=cluster.local
   103        - name: skydns
   104          image: gcr.io/google_containers/skydns:2015-10-13-8c72f8c
   105          resources:
   106            # TODO: Set memory limits when we've profiled the container for large
   107            # clusters, then set request = limit to keep this container in
   108            # guaranteed class. Currently, this container falls into the
   109            # "burstable" category so the kubelet doesn't backoff from restarting it.
   110            limits:
   111              cpu: 100m
   112              memory: 200Mi
   113            requests:
   114              cpu: 100m
   115              memory: 50Mi
   116          args:
   117          # command = "/skydns"
   118          - -machines=http://127.0.0.1:4001
   119          - -addr=0.0.0.0:53
   120          - -ns-rotate=false
   121          - -domain=cluster.local.
   122          ports:
   123          - containerPort: 53
   124            name: dns
   125            protocol: UDP
   126          - containerPort: 53
   127            name: dns-tcp
   128            protocol: TCP
   129        - name: healthz
   130          image: gcr.io/google_containers/exechealthz:1.0
   131          resources:
   132            # keep request = limit to keep this container in guaranteed class
   133            limits:
   134              cpu: 10m
   135              memory: 20Mi
   136            requests:
   137              cpu: 10m
   138              memory: 20Mi
   139          args:
   140          - -cmd=nslookup kubernetes.default.svc.cluster.local 127.0.0.1 >/dev/null
   141          - -port=8080
   142          ports:
   143          - containerPort: 8080
   144            protocol: TCP
   145        volumes:
   146        - name: etcd-storage
   147          emptyDir: {}
   148        dnsPolicy: Default  # Don't use cluster DNS.