Helm chart - missing annotation for nginx LB service #4622
Closed
vaclavhluzek
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
|
To add annotations to the Service fronting the NGINX deployment, there are two options: apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: gateway
spec:
gatewayClassName: nginx
listeners:
- name: http
port: 80
protocol: HTTP
hostname: "*.example.com"
infrastructure:
annotations:
service.beta.kubernetes.io/azure-load-balancer-internal-subnet: snet-cze-prd-we-laz-akssvc-001Please note this will add the annotation to all the resources provisioned as part of that Gateway deployment (Service, Deployment/DaemonSet, etc.). This is the simpler approach if you want the annotation applied broadly.
apiVersion: gateway.nginx.org/v1alpha2
kind: NginxProxy
metadata:
name: ngf-proxy-multi-patch
spec:
kubernetes:
service:
patches:
- type: StrategicMerge
value:
metadata:
annotations:
service.beta.kubernetes.io/azure-load-balancer-internal-subnet: snet-cze-prd-we-laz-akssvc-001Let me know if you have any questions! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
There is no option in Helm to add annotations for the Load Balancer that is being created with a new listener. We have to manually annotate it for Azure to use an Internal LB.
Example:
kubectl annotate svc nginx-gateway-nginx -n nginx-gateway service.beta.kubernetes.io/azure-load-balancer-internal="true" --overwrite
kubectl annotate svc nginx-gateway-nginx -n nginx-gateway service.beta.kubernetes.io/azure-load-balancer-internal-subnet="snet-cze-prd-we-laz-akssvc-001" --overwrite
Proof me wrong or craete issue.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions