Configure Pinniped to use internal Azure load balancer before management cluster creation
To configure Pinniped to use internal Azure load balancer before management cluster creation, add the service.beta.kubernetes.io/azure-load-balancer-internal: "true" annotation to pinniped-addon secret and pinniped-supervisor service. For this, create the below overlay yaml file on ~/.config/tanzu/tkg/providers/ytt directory:
#@ load("@ytt:data", "data")
#@ load("@ytt:yaml", "yaml")
#@ load("@ytt:overlay", "overlay")
#@overlay/match by=overlay.subset({"kind":"Secret", "metadata": {"name": data.values.CLUSTER_NAME+"-pinniped-addon", "namespace": data.values.NAMESPACE}}), expects="0+"
#@yaml/text-templated-strings
---
stringData:
#@overlay/match by=overlay.subset({"stringData": "overlays.yaml"}), expects="0+"
overlays.yaml: |
#@ load("@ytt:overlay", "overlay")
#@overlay/match by=overlay.subset({"kind": "Service", "metadata": {"name": "pinniped-supervisor", "namespace": "pinniped-supervisor"}}),expects="0+"
---
metadata:
#@overlay/match missing_ok=True
annotations:
#@overlay/match missing_ok=True
service.beta.kubernetes.io/azure-load-balancer-internal: "true"
---
#@ load("@ytt:overlay", "overlay")
#@overlay/match by=overlay.subset({"kind": "Service", "metadata": {"name": "dexsvc", "namespace": "tanzu-system-auth"}}),expects="0+"
---
metadata:
#@overlay/match missing_ok=True
annotations:
#@overlay/match missing_ok=True
service.beta.kubernetes.io/azure-load-balancer-internal: "true"