[ad_1]
I have difficulty setting up an Ingress with Helm Chart on the cloud.
- I have a project with a Front, a Back and a MySQL database.
- I setup two Ingress, one for my BackEnd and one for my FrontEnd, I can access it with an IP given by Google Cloud Platform.
In the FrontEnd and BackEnd charts values.yaml
:
...
service:
type: LoadBalancer
port: 8000 # 4200 for the FrontEnd
targetPort: 8000 # 4200 for FrontEnd
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/cors-allow-origin: "*"
nginx.ingress.kubernetes.io/cors-allow-methods: "PUT, GET, POST, OPTIONS, DELETE"
nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,X-CustomHeader,X-LANG,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-ConSSH / 51970trol,Content-Type,X-Api-Key,X-Device-Id,Access-Control-Allow-Origin"
hosts:
- paths:
- path: /
pathType: ImplementationSpecific
...
The FrontEnd needs to talk to the BackEnd throughout the Ingress.
In the FrontEnd values.yaml, I need to have a value:BACKEND_URL: XXX.XXX.XXX.XXX:8000
But I don’t know the URL of the BackEnd Ingress, or at least, until I deploy the back.
- How can I variabilize it, to retrieve the URL ingress of the BackEnd?
- Or at least, how can I find the ingress IP? (I’ve tried kubectl get ingress, it doesn’t show the address).
[ad_2]