apiVersion: v1
kind: Pod
metadata:
  name: nginx-ingress-controller
  labels:
    k8s-app: nginx-ingress-lb
spec:
  containers:
  - image: gcr.io/google_containers/nginx-ingress-controller:0.8.3
    name: nginx-ingress-lb
    imagePullPolicy: Always
    readinessProbe:
      httpGet:
        path: /healthz
        port: 10254
        scheme: HTTP
    livenessProbe:
      httpGet:
        path: /healthz
        port: 10254
        scheme: HTTP
      initialDelaySeconds: 10
      timeoutSeconds: 1
    # use downward API
    env:
      - name: POD_NAME
        valueFrom:
          fieldRef:
            fieldPath: metadata.name
      - name: POD_NAMESPACE
        valueFrom:
          fieldRef:
            fieldPath: metadata.namespace
    ports:
    - containerPort: 53
      protocol: "UDP"
      hostPort: 53
    args:
    - /nginx-ingress-controller
    - --default-backend-service=$(POD_NAMESPACE)/default-http-backend
    - --udp-services-configmap=$(POD_NAMESPACE)/dns-config-map
