apiVersion: v1
kind: ReplicationController
metadata:
  name: nginx-ilb-rc
  labels:
    app: nginx-ilb
spec:
  replicas: 1
  selector:
    app: nginx-ingress
  template:
    metadata:
      labels:
        app: nginx-ingress
    spec:
      containers:
      - image: ndslabs/nginx-ingress-controller:0.61
        imagePullPolicy: Always
        name: nginx-ingress
        ports:
        - containerPort: 80
          hostPort: 80
        - containerPort: 443
          hostPort: 443
        env:
          - name: POD_NAME
            valueFrom:
              fieldRef:
                fieldPath: metadata.name
          - name: POD_NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
        args:
        - /nginx-ingress-controller
        - --default-backend-service=default/default-http-backend
        - --running-in-cluster=true
        - --healthz-port=9999
      hostNetwork: true
      nodeSelector:
          ndslabs-node-role: loadbalancer
