3
votes

What are the equivalent of the following annotations for GCP ingress? I'm trying to use a custom nginx-template but I can't find the reference for the following annotations. In the github answer they're using AWS but I need to achieve this using GCP.

"service.beta.kubernetes.io/aws-load-balancer-proxy-protocol": "*"
"service.beta.kubernetes.io/aws-load-balancer-backend-protocol": "tcp"
"service.beta.kubernetes.io/aws-load-balancer-ssl-ports": "https"
"service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout": "60"

I'm using ingress class nginx

kubernetes.io/ingress.class: "nginx"

And I'm trying to do Ingress TCP SSL termination in GCP Kubernetes cluster using Ingress controller.

I want the traffic from https://example.com:1234 to be redirect to http://example.com:1234. The backend port 1234 is HTTP only.

Here's a example for AWS - https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.1/guide/service/annotations/

I need something like that for GCP

1
Your question is unclear, and also not related to programming and thus belongs on ServerFault.com You say GCP but do you mean GKE? and if not GKE, then are you running your own k8s with its own cloud-provider set to GCP? Are you looking for more annotations like cloud.google.com/load-balancer-type:?mdaniel
Yea its for GKE. For AWS services Kubernetes have a page with all the annotations listed out. But I can't find a annotation list for GCP services. Just like AWS, for Nginx controller, nginx has a list of supported annotations listed in their docs.John
Here's a example for AWS - kubernetes-sigs.github.io/aws-load-balancer-controller/v2.1/… I need something like that for GCPJohn
There are some annotations for gce ingress: cloud.google.com/kubernetes-engine/docs/how-to/…VASャ

1 Answers

0
votes

I don't think you will find something like a list of all GCP Ingress annotations. The only ones close to it can be found on Github.

If you think that list of all GCP annotations would be useful, you can file a Feature Request at Google Public Issue Tracker and ask for changes to the documentation with all the annotations supported by GKE Ingress.

In some cases you can use GCP LB (like HTTP(S) Load Balancer) + NEG + GKE, but accordingly to the doc Choosing a load balancer, only External Network TCP/UDP support any LoadBalancer destination ports and accordingly to the doc Zonal network endpoint groups overview it's not possible to use External TCP/UDP Network Load Balancers with NEGs.

However, in your question, you mention that you are using the annotation kubernetes.io/ingress.class:" nginx ", which means you are using Nginx Ingress (If ingress.class is not specified, it's using default which is kubernetes.io/ingress.class:"gce").

Nginx Ingress has a list of all annotations, but I think the most interesting for you would be TCP and UDP Service Disclosure.