diff --git a/35_app_gateway_ingress/Readme.md b/35_app_gateway_ingress/Readme.md index 9410600..1802891 100644 --- a/35_app_gateway_ingress/Readme.md +++ b/35_app_gateway_ingress/Readme.md @@ -247,8 +247,6 @@ Here are some of the possibilities: - Rewrite HTTP headers and URL. - Enabling Cookie affinity. -Note: there is some limitations to App Gateway. For example, the public IP could not be disabled. - ## More resources: https://azure.github.io/application-gateway-kubernetes-ingress/ diff --git a/35_app_gateway_ingress/commands.ps1 b/35_app_gateway_ingress/commands.ps1 index f2fcbe6..22be4dc 100644 --- a/35_app_gateway_ingress/commands.ps1 +++ b/35_app_gateway_ingress/commands.ps1 @@ -1,21 +1,21 @@ # create an AKS cluster with Azure CNI network plugin -az group create -n rg-aks-cluster -l swedencentral +az group create -n rg-aks-cluster-swc -l swedencentral -az aks create -n aks-cluster -g rg-aks-cluster --network-plugin azure +az aks create -n aks-cluster -g rg-aks-cluster-swc --network-plugin azure # AKS by default uses 10.224.0.0/12 for VNET and 10.224.0.0/16 for Subnet # enable Azure Application Gateway Ingress Controller -az aks addon enable -n aks-cluster -g rg-aks-cluster ` +az aks addon enable -n aks-cluster -g rg-aks-cluster-swc ` --addon ingress-appgw ` --appgw-subnet-cidr 10.225.0.0/16 ` --appgw-name gateway # connect to AKS cluster -az aks get-credentials -n aks-cluster -g rg-aks-cluster --overwrite-existing +az aks get-credentials -n aks-cluster -g rg-aks-cluster-swc --overwrite-existing # view the ingress class created by AGIC diff --git a/35_app_gateway_ingress/ingress_appgw.yaml b/35_app_gateway_ingress/ingress_appgw.yaml index 9d8c4da..88517be 100644 --- a/35_app_gateway_ingress/ingress_appgw.yaml +++ b/35_app_gateway_ingress/ingress_appgw.yaml @@ -18,7 +18,8 @@ spec: - name: aspnetapp image: mcr.microsoft.com/dotnet/samples:aspnetapp ports: - - containerPort: 80 + - containerPort: 8080 + protocol: TCP --- apiVersion: v1 kind: Service @@ -30,7 +31,7 @@ spec: ports: - protocol: TCP port: 80 - targetPort: 80 + targetPort: 8080 --- apiVersion: networking.k8s.io/v1 kind: Ingress