Created by: ston1th 2019-11-13 22:33:56
Updated by: ston1th 2020-01-20 20:08:44
Visibility: Public

Nginx Ingress Controller

Install an nginx ingress controller to route traffic into your cluster.

curl -s https://raw.githubusercontent.com/kubernetes/ingress-nginx/2de5a893aa15f14102d714e918b0045b960ad1a5/docs/examples/psp/psp.yaml >/etc/kubernetes/ingress-nginx-psp.yaml

curl -s https://raw.githubusercontent.com/kubernetes/ingress-nginx/2de5a893aa15f14102d714e918b0045b960ad1a5/deploy/static/mandatory.yaml >/etc/kubernetes/ingress-nginx.yaml

# bare metal (layer 2)
curl -s https://raw.githubusercontent.com/kubernetes/ingress-nginx/2de5a893aa15f14102d714e918b0045b960ad1a5/deploy/static/provider/cloud-generic.yaml >>/etc/kubernetes/ingress-nginx.yaml

# hetzner cloud
curl -s https://raw.githubusercontent.com/kubernetes/ingress-nginx/2de5a893aa15f14102d714e918b0045b960ad1a5/deploy/static/provider/baremetal/service-nodeport.yaml >>/etc/kubernetes/ingress-nginx.yaml

sed -i -e '/--annotations-prefix/ a\            - --ssl-passthrough-proxy-port=442' /etc/kubernetes/ingress-nginx.yaml

KUBECONFIG=/etc/kubernetes/admin.conf kubectl apply -f /etc/kubernetes/ingress-nginx-psp.yaml
KUBECONFIG=/etc/kubernetes/admin.conf kubectl apply -f /etc/kubernetes/ingress-nginx.yaml

Hetzner Cloud

To direct traffic from the kubernetes master to the ingress controller you can use the nginx-ingress-proxy.

https://git.giftfish.de/ston1th/nginx-ingress-proxy