Question
Is it possible to attach a custom firewall rule to a GKE created load balancer?
Here are the default firewall rules created.
I have done something similar in AWS in the past, but I am currently having trouble finding a similar annotation (or other process) to automatically add a cloud firewall rule to a load balancer that is created by GKE.
Example in AWS
Here is an example of what I've done in AWS in the past for context:
- Pre-create a Security Group in the AWS console
- Create a service of
type: Loadbalancer
in a kubernetes cluster deployed in AWS with the following annotation:service.beta.kubernetes.io/aws-load-balancer-extra-security-groups: "sg-53fae93f"
What this will do is automatically add the security groups sg-53fae93f
to the load balancer created by kubernetes.
Thank you in advance!