Files
kubernetes/ingress/kustomization.yaml
Dustin C. Hatch fefbaa9991 ingress: Use Deployment+Service with externalIPs
Now that we have `keepalived` managing the "virtual" IP address for the
ingress controller, we can change _ingress-nginx_ to run as a Deployment
rather than a DaemonSet.  It no longer needs to use the host network
namespace, as `kube-proxy` will route all traffic sent to the configured
external IP address to the controller pods.  Using the _Local_ external
traffic policy disables NAT, so incoming traffic is seen by the
nginx unmodified.
2024-11-22 22:35:37 -06:00

43 lines
940 B
YAML

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: ingress-nginx
resources:
- https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.3.0/deploy/static/provider/cloud/deploy.yaml
replicas:
- name: ingress-nginx-controller
count: 2
patches:
- patch: |-
apiVersion: v1
kind: Service
metadata:
name: ingress-nginx-controller
namespace: ingress-nginx
spec:
externalIPs:
- 172.30.0.147
externalTrafficPolicy: Local
- patch: |-
- op: add
path: /spec/template/spec/containers/0/args/-
value: >-
--default-ssl-certificate=default/pyrocufflink-cert
target:
group: apps
kind: Deployment
name: ingress-nginx-controller
version: v1
- patch: |-
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
name: nginx
annotations:
ingressclass.kubernetes.io/is-default-class: "true"