Skip to content

Azure Load Balancer notes #16456

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ bookinfo-gateway istio bookinfo-gateway-istio.default.svc.cluster.local Tr

Wait for the gateway to show as programmed before continuing.

{{< tip >}}
If you use Azure Kubernetes Service (AKS), and want to keep the service type as `LoadBalancer` to access it without a tunnel, you also need to run
{{< text bash >}}
$ kubectl annotate svc/bookinfo-gateway-istio service.beta.kubernetes.io/port_80_health-probe_protocol=tcp
{{< /text >}}
for Azure Load Balancer health probes to work correctly.
{{< /tip >}}

## Access the application

You will connect to the Bookinfo `productpage` service through the gateway you just provisioned. To access the gateway, you need to use the `kubectl port-forward` command:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ kubectl get gateway
NAME CLASS ADDRESS PROGRAMMED AGE
bookinfo-gateway istio bookinfo-gateway-istio.default.svc.cluster.local True 42s
ENDSNIP

snip_deploy_and_configure_the_ingress_gateway_4() {
kubectl annotate svc/bookinfo-gateway-istio service.beta.kubernetes.io/port_80_health-probe_protocol=tcp
}
8 changes: 8 additions & 0 deletions content/en/docs/examples/bookinfo/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,14 @@ Kubernetes cluster, e.g., from a browser. A gateway is used for this purpose.
$ export INGRESS_PORT=$(kubectl get gtw bookinfo-gateway -o jsonpath='{.spec.listeners[?(@.name=="http")].port}')
{{< /text >}}

{{< tip >}}
If you use Azure Kubernetes Service (AKS), you also need to run
{{< text bash >}}
$ kubectl annotate svc/bookinfo-gateway-istio service.beta.kubernetes.io/port_80_health-probe_protocol=tcp
{{< /text >}}
for Azure Load Balancer health probes to work correctly.
{{< /tip >}}

{{< /tab >}}

{{< /tabset >}}
Expand Down
4 changes: 4 additions & 0 deletions content/en/docs/examples/bookinfo/snips.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ export INGRESS_PORT=$(kubectl get gtw bookinfo-gateway -o jsonpath='{.spec.liste
}

snip_determine_the_ingress_ip_and_port_6() {
kubectl annotate svc/bookinfo-gateway-istio service.beta.kubernetes.io/port_80_health-probe_protocol=tcp
}

snip_determine_the_ingress_ip_and_port_7() {
export GATEWAY_URL=$INGRESS_HOST:$INGRESS_PORT
}

Expand Down
9 changes: 9 additions & 0 deletions content/en/docs/setup/platform-setup/azure/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,12 @@ For the `az` cli option, complete `az login` authentication OR use cloud shell,
{{< text bash >}}
$ az aks get-credentials --resource-group myResourceGroup --name myAKSCluster
{{< /text >}}

### Using Gateway API with Azure

If you are using Gateway API with AKS, you might also need apply the following configuration
{{< text bash >}}
$ kubectl annotate svc/<load balancer service name> service.beta.kubernetes.io/port_<http port>_health-probe_protocol=tcp
{{< /text >}}
where `<load balancer service name>` is the name of the load balancer service created by Istio and `<http port>` is the port number of the HTTP listener.
This annotation is required for Azure Load Balancer health checks to work when the `/` path responds with a non 200 code.