Adding Lets Ingress

Use the following yaml file to expose the frontend service via the ingress:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: simple-frontend-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- http:
paths:
- path: /
backend:
serviceName: frontend
servicePort: 80

Use kubctl apply -f simple-frontend-ingress.yaml to connect the nginx-ingress service to the frontend service. As you can see in the rules section, it tells nginx that when someone goes to the path https://<EXTERNAL-IP>/ use in the backend, the service named frontend is listening on service port 80.

Go to https://<EXTERNAL-IP>/ and you should get the following output:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset