How to configure Pinniped to use internal Azure load balancer before management cluster creation
search cancel

How to configure Pinniped to use internal Azure load balancer before management cluster creation

book

Article ID: 325736

calendar_today

Updated On:

Products

Tanzu Kubernetes Grid

Issue/Introduction

Configure Pinniped to use internal Azure load balancer before management cluster creation


Environment

VMware Tanzu Kubernetes Grid 1.x

Resolution

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"