We are going to use the Nginx Helm installation.
kubectl create ns nginx-ingress
helm install nginx-ingress nginx-stable/nginx-ingress -f /home/ubuntu/lab/files/4ingress/helm_ingress_values.yaml -n nginx-ingress
Output
cat << EOF | kubectl apply -f -
apiVersion: v1
kind: Service
metadata:
name: dashboard-nginx-ingress
namespace: nginx-ingress
annotations:
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "tcp"
service.beta.kubernetes.io/aws-load-balancer-type: nlb
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: 8080
protocol: TCP
name: http
selector:
app: nginx-ingress-nginx-ingress
EOF
kubectl get svc --namespace=nginx-ingress
Output
Note the EXTERNAL-IP of the “dashboard-nginx-ingress”. This is the hostname that we are going to use in order to view the Nginx Dashboard.
Browse to the following location and verify you can see the dashboard: http://<DASHBOARD-EXTERNAL-IP>/dashboard.html
Note the EXTERNAL-IP of the “nginx-ingress”. This is the hostname that we are going to use in order to publish the Arcadia web application.
Browse to the following location and verify that you receive a 404 status code: http://<INGRESS-EXTERNAL-IP>/
Please note that it might take some time for the DNS names to become available.
dingress=$(kubectl get svc dashboard-nginx-ingress --namespace=nginx-ingress | tr -s " " | cut -d' ' -f4 | grep -v "EXTERNAL-IP")
echo "export dashboard_nginx_ingress=$dingress" >> ~/.bashrc
ningress=$(kubectl get svc nginx-ingress-nginx-ingress --namespace=nginx-ingress | tr -s " " | cut -d' ' -f4 | grep -v "EXTERNAL-IP")
echo "export nginx_ingress=$ningress" >> ~/.bashrc
source ~/.bashrc