The OSM ingress guide with Azure Application Gateway is a short demo on exposing HTTP routes on services within the mesh externally using the Azure Application Gateway ingress controller.
HTTP traffic with ingress
The following demo sends a request from an external IP to a httpbin service inside the cluster.
Create an Azure Kubernetes Service (AKS) cluster with Application Gateway and install the application gateway ingress controller on the cluster.
Verify that the ingress-azure pod is up and running in the default namespace:
$ kubectl get pods NAME READY STATUS RESTARTS AGE ingress-azure-5cdf9b7586-z66m9 1/1 Running 0 96m
Install OSM onto the cluster.
httpbinservice into the
httpbinnamespace after enrolling its namespace to the mesh. The
httpbinservice runs on port
# Create the httpbin namespace kubectl create namespace httpbin # Add the namespace to the mesh osm namespace add httpbin # Deploy httpbin service in the httpbin namespace kubectl apply -f docs/example/manifests/samples/httpbin/httpbin.yaml -n httpbin
httpbinservice and pods are up and running.
$ kubectl get pods -n httpbin NAME READY STATUS RESTARTS AGE httpbin-74677b7df7-zzlm2 2/2 Running 0 11h
$ kubectl get svc -n httpbin NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE httpbin ClusterIP 10.0.22.196 <none> 14001/TCP 11h
Apply an ingress configuration yaml to expose the HTTP path
kubectl apply -f
apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: httpbin-ingress namespace: httpbin annotations: kubernetes.io/ingress.class: azure/application-gateway spec: rules: - http: paths: - path: /status/200 backend: serviceName: httpbin servicePort: 14001
Confirm that the httpbin-ingress has been successfully deployed.
$ kubectl get ingress -n httpbin NAMESPACE NAME CLASS HOSTS ADDRESS PORTS AGE httpbin httpbin-ingress <none> * 220.127.116.11 80 7m18s
Confirm that a request to the httpbin service from the external IP address of the Ingress resource succeeds (in this case, the external address would be
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.