I’m presently establishing an atmosphere to deploy an utility on google cloud platform utilizing kubernetes.
I attempted establishing an Ingress to connect with my
NodePort companies with the next yaml config:
apiVersion: networking.k8s.io/v1beta1 form: Ingress metadata: identify: my-ingress annotations: ingress.gcp.kubernetes.io/pre-shared-cert: "my-certificate" spec: guidelines: - host: instance.com http: paths: - path: /* backend: serviceName: web site servicePort: 80 - path: /api/* backend: serviceName: api servicePort: 80
instance.com and all routes go to my
web site service, and all requests to
instance.com/api/ go to my API app.
Solely factor is I would like all requests to be rewritten to my app as
/<endpoint> as an alternative of
/api/<endpoint>. Only a few days again gcp added the power to specify extra redirect and rewrite guidelines for load balancers, but it surely is not accessible to be configured in YAML but (as seen right here: https://github.com/kubernetes/ingress-gce/points/109).
Now I went to go manually configure the host rewrite by way of the cloud console. As soon as I save, the settings seem to get reverted again inside about 10 minutes and I can not determine why.
I additionally need to arrange a http to https redirect rule, however I can not create these both as a result of they appear to get reverted as nicely.
May anyone clarify why that is?
I am unsure if it issues however I used
kubectl apply -f my-ingress.yaml to create the ingress