Installation of Ingress nginx
Refer: https://github.com/kubernetes/ingress-nginx
Install using baremetal
Refer: https://kubernetes.github.io/ingress-nginx/deploy/#bare-metal
Download script to specific folder
cd <folder-path>
wget https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.46.0/deploy/static/provider/baremetal/deploy.yaml
Rename download .yaml file
mv ./deploy.yaml ingress-nginx-controller.yaml
in order to use ingress and assign an external ip address we ned to use Load Balancer instead of NodePort of ingress nginx controller. Update ingress-nginx-controller.yaml with following lines
spec:
type: LoadBalancer
externalIPs:
- <valid-external-ip>
Install ingress controller using following command
kubectl apply -f ingress-nginx-controller.yaml
Above command will create following pods and services
ingress nginx controller is now installed. We can now create ingress object to correctly route traffix to NodePort or ClusterIP services