Skip to content

Commit

Permalink
35
Browse files Browse the repository at this point in the history
  • Loading branch information
Houssem Dellai committed Sep 25, 2024
1 parent b054abb commit ef8c47a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 0 additions & 2 deletions 35_app_gateway_ingress/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/
8 changes: 4 additions & 4 deletions 35_app_gateway_ingress/commands.ps1
Original file line number Diff line number Diff line change
@@ -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

Expand Down
5 changes: 3 additions & 2 deletions 35_app_gateway_ingress/ingress_appgw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -30,7 +31,7 @@ spec:
ports:
- protocol: TCP
port: 80
targetPort: 80
targetPort: 8080
---
apiVersion: networking.k8s.io/v1
kind: Ingress
Expand Down

0 comments on commit ef8c47a

Please sign in to comment.