rc.yaml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # nginx ingress controller RC
  2. apiVersion: v1
  3. kind: ReplicationController
  4. metadata:
  5. name: nginx-ingress-controller
  6. labels:
  7. k8s-app: nginx-ingress-lb
  8. spec:
  9. replicas: 1
  10. selector:
  11. k8s-app: nginx-ingress-lb
  12. template:
  13. metadata:
  14. labels:
  15. k8s-app: nginx-ingress-lb
  16. name: nginx-ingress-lb
  17. spec:
  18. terminationGracePeriodSeconds: 0
  19. containers:
  20. - image: k8s.gcr.io/nginx-ingress-controller:0.9.0-beta.1
  21. livenessProbe:
  22. httpGet:
  23. path: /healthz
  24. port: 10254
  25. scheme: HTTP
  26. initialDelaySeconds: 30
  27. timeoutSeconds: 5
  28. name: nginx-ingress-lb
  29. # use downward API
  30. env:
  31. - name: POD_NAME
  32. valueFrom:
  33. fieldRef:
  34. fieldPath: metadata.name
  35. - name: POD_NAMESPACE
  36. valueFrom:
  37. fieldRef:
  38. fieldPath: metadata.namespace
  39. ports:
  40. - containerPort: 80
  41. hostPort: 80
  42. - containerPort: 443
  43. hostPort: 443
  44. # we expose 18080 to access nginx stats in url /nginx-status
  45. # this is optional
  46. - containerPort: 18080
  47. hostPort: 18080
  48. args:
  49. - /nginx-ingress-controller
  50. - --default-backend-service=kube-system/default-http-backend