Azure Aks Agic v2
Azure Aks Agic v2
30 Real-World Demos
StackSimplify
AWS EKS Jenkins Azure Kubernetes Service
AGIC Ingress
Kubernetes Ansible 30+ Real-World Demos
Azure AKS HELM Masterclass Azure Certs
Kubernetes
AWS ECS
DevOps & 40+ Concept AZ-900, 104,
Demos 204, 400
Docker on AWS
AWS
SRE Kubernetes Google Cloud
Associate &
CloudFormatio Roadmap Certifications
Professional
CKAD, CKA, CKS
n Certs
HashiCorp Certified Terraform Associate on AWS with 50 Practical Demos
Terraform on AWS with SRE and IaC DevOps with 20 Real-World Demos
HashiCorp Certified Terraform Associate on Azure with 75 Practical
Demos
Terraform on Azure with IaC DevOps SRE with 25 Real-World Demos
Terraform on AWS EKS Elastic Kubernetes Service with 50+ Real-World Demos
Google Kubernetes Engine with DevOps - 75+ Real-World Demos
© Kalyan Reddy Daida StackSimplify
Google Cloud Certifications Google Cloud Real-World
Road Map Courses Road Map
StackSimplify
Azure Kubernetes Service + Application Gateway Ingress Controller
Azure
Install AGIC as Application Ingress Override
1 8
AKS Add-On Frontend Port
Gateway
Ingress Default Backend 2 Ingress 9 Ingress Rewrite Rule Set
Controller
Ingress HTTP Paths and Ingress Default and HTTP
3 AGIC 10
Rules Probes
Ingress URL Routing Ingress Readiness
4 11
(Path based Routing) Liveness Health Probes
Ingress Backend Path Ingress Health Probe
5 30 12
Prefix Annotations
Real-World
Ingress Backend Host
Name
6 AGIC Ingress 13 Delegate DNS Domain
Demos
Ingress Cookie Based Install External DNS
7 14
Affinity Controller
Step by Step
Documentation
On
GitHub
for each
Demo
AKS Cluster
2 1
Azure Resource
AGIC Ingress Controller k8s API Server
Manager
Demo-01
Application MyApp
3 Gateway
2 1
Azure Resource
AGIC Ingress Controller k8s API Server
Manager
Demo-02
/app1
Application App1
Gateway
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
Demo-03
App1
AppGW
Public IP
/app1
/app2 App2
default or
Application
“/”
Gateway
MyApp
AppGW
Public IP
/myapps/app1 appgw.ingress.kubernetes.io/backend-path-prefix: "/app1/"
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
Demo-05
appgw.ingress.kubernetes.io/backend-hostname: "internal.stacksimplify.com"
AppGW
Public IP
/
EchoServer
Application
Gateway
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
Demo-06
appgw.ingress.kubernetes.io/cookie-based-affinity: "true"
AppGW
Public IP
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
Demo-07-01
appgw.ingress.kubernetes.io/cookie-based-affinity: "true"
AppGW appgw.ingress.kubernetes.io/cookie-based-affinity-distinct-name: "true"
Public IP
Application
Gateway
Echo Server
3
1
appgw.ingress.kubernetes.io/override-frontend-port: "8080"
AppGW
Public IP
/
MyApp
Application
Gateway
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
Demo-08
appgw.ingress.kubernetes.io/rewrite-rule-set: my-headers-
AppGW rewrite-ruleset
Public IP
/
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
Demo-09
/
MyApp
Application
Gateway
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
Demo-10-01
/app1
App1
Application
Gateway
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
Demo-10-02
AppGW
Custom
Public IP Readiness Probe
HTTP Probe
/
App1
Application
Gateway
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
Demo-11-01
AppGW Custom
Public IP Liveness Probe
HTTP Probe
/
App2
Application
Gateway
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
Demo-11-02
/
App1
Application
Gateway
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
Demo-11-03
/
App1
Application
Gateway
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
Demo-12
kubeoncloud.com kubeoncloud.com
Demo-13
Managed
Service
Identity
AKS NodePool VMSS
eapp2.kubeoncloud.com App1
AppGW Public IP Application
Gateway eapp3.kubeoncloud.com
DNS
Zones
App2
Managed
Service
Identity
AKS NodePool VMSS External DNS App3
Managed TLS
Service (spec.tls.secretName)
Identity External DNS
AKS NodePool VMSS Ingress Service
Managed TLS
Service (spec.tls.secretName)
Identity External DNS
AKS NodePool VMSS Ingress Service
SSL PFX
SSL Cert
Managed
Service SSL Key
Identity
AKS NodePool VMSS
External DNS
LB Public IP HTTPS
Backend SSL
SSL Cert
SSL Key Backend
K8s Secret
MyApp
Azure
Load Balancer
Demo-20
External DNS
Users AKS
HTTP -> HTTPS
sapp1.kubeoncloud.com Cluster SSL Cert
Default
OWASP
Policies
WAF
AKS Cluster
Test User
curl http://private-ip
curl pod
Application Gateway
appgw.ingress.kubernetes.io/use-private-ip: "true"
Private IP /
AppGW Public IP
Echo Server
AKS Cluster
LB Public IP
NGINX Ingress Controller App1
Application Gateway
Users
/
App2
AppGW Public IP
AKS Cluster
AppGW
Public IP
Application
3 Gateway
2 1
Azure Resource
AGIC Ingress Controller k8s API Server
Manager
Demo-27
myaciapp2.kubeoncloud.com
Users
myaciapp2
App1
AppGW App1
Public IP
/app1
Namespace: Production
/app2
Application
Gateway App2
AppGW App1
Public IP
Namespace: Production
/app2
Application
Gateway App2
Demo-01
Azure Cloud
Application
Gateway
AKS Cluster
With AGIC we can expose
Azure AGIC is a k8s applications deployed
Kubernetes Application on AKS Cluster using
deployed on Azure AKS Azure Application
Cluster Gateway L7 Load Balancer
AGIC Ingress Controller
AKS Cluster
2 1
Azure Resource
AGIC Ingress Controller k8s API Server
Manager
NGINXIC AGIC
Traffic flows via Ingress Controller k8s Service and Pods Traffic flows from Application Gateway directly to k8s
(Additional Network Hops) Pods
Uses AKS cluster compute resources for traffic flow AKS Compute resources are not used for traffic flow
AGIC uses AKS compute resources just to transform Ingress
Service manifest to AppGW config and submit to Azure
Resource Manager (Only during Ingress resource
create/update/delete actions)
Additional Reference: https://azure.microsoft.com/en-us/blog/application-gateway-ingress-controller-for-azure-kubernetes-service/
With AKS AGIC AddOn Deployment is super simple Supports additional features (verbose levels, auth type)
Fully managed service provided by Microsoft Shared: Same AppGW can be shared with other Azure Services
ProhibitedTargets: Configure AppGw without affecting other
Automatic Updates and increased support backends
Manually upgrade AGIC using HELM (No Automatic), Use latest
First-class Add On or desired versions
© Kalyan Reddy Daida StackSimplify
Azure Application Gateway Ingress
Azure
Controller
Cloud Virtual Network (10.224.0.0/12)
AKS Cluster
AppGW
Public IP
AGIC Managed
Identity
Application
Gateway
Azure Resource
AGIC Ingress Controller k8s API Server
Manager
Azure AKS
AGIC
Ingress Default Backend
Application MyApp
3 Gateway
2 1
Azure Resource
AGIC Ingress Controller k8s API Server
Manager
Ingress
Default
Backend
Azure AKS
AGIC
Ingress HTTP Rules & Paths
/app1
Application App1
Gateway
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
Ingress
HTTP
Rules & Paths
Azure AKS
AGIC
Ingress URL Routing
App1
AppGW
Public IP
/app1
/app2 App2
default or
Application
“/”
Gateway
MyApp
Azure AKS
AGIC
Annotations
Backend Path Prefix
AppGW
Public IP
/myapps/app1 appgw.ingress.kubernetes.io/backend-path-prefix: "/app1/"
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
Data serves
from k8s Pod
at context
/app1
© Kalyan Reddy Daida StackSimplify
Azure AGIC - Ingress Backend
Path Prefix
Application Backend
Application Gateway Rules
Settings
Azure AKS
AGIC
Annotations
Backend Hostname
appgw.ingress.kubernetes.io/backend-hostname: "internal.stacksimplify.com"
AppGW
Public IP
/
EchoServer
Application
Gateway
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
Backend
Hostname
Annotation
Azure AKS
AGIC
Annotations
Cookie based Affinity
appgw.ingress.kubernetes.io/cookie-based-affinity: "true"
AppGW
Public IP
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
Cookie
Based
Affinity
Annotation
Cookie-based Affinity
Backend Setting will
be enabled
appgw.ingress.kubernetes.io/cookie-based-affinity: "true"
AppGW appgw.ingress.kubernetes.io/cookie-based-affinity-distinct-name: "true"
Public IP
Application
Gateway
Echo Server
3
1
Distinct
Cookie
Annotation
Cookie-based Affinity
and
Affinity cookie name
Backend Settings will
be enabled
Echo Server
Application
Output
Browser
Developer
Tools
Output
Azure AKS
AGIC
Annotations
Override Frontend Port
appgw.ingress.kubernetes.io/override-frontend-port: "8080"
AppGW
Public IP
/
MyApp
Application
Gateway
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
Override
Frontend Port
Annotation
Port 8080
will be
updated in
Listeners
Settings
Azure AKS
AGIC
Annotations
Rewrite Rule Set
appgw.ingress.kubernetes.io/rewrite-rule-set: my-headers-
AppGW rewrite-ruleset
Public IP
/
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
Rewrite
Rule Set
Annotation
Routing Rule
will be selected
when Ingress
service with
rewrite-rule-set
Annotation
deployed
Echo Server
Application
Output
Azure AKS
AGIC
Annotations
Health Probes - Default and HTTP
/
MyApp
Application
Gateway
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
/app1
App1
Application
Gateway
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
Azure AKS
AGIC
Annotations
Health Probes
Readiness and Liveness Probes
AppGW
Custom
Public IP Readiness Probe
HTTP Probe
/
App1
Application
Gateway
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
AppGW Custom
Public IP Liveness Probe
HTTP Probe
/
App2
Application
Gateway
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
/
App1
Application
Gateway
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
When both
probes are
used which,
one takes
priority ?
Azure AKS
AGIC
Annotations
Health Probe Ingress Annotations
/
App1
Application
Gateway
3 1
2
AGIC Ingress Controller k8s API Server
Azure Resource
Manager
Azure AKS
AGIC
Delegate DNS Domain
AWS Route53 to Azure DNS Zones
kubeoncloud.com kubeoncloud.com
Azure AKS
AGIC
External DNS Install
Managed
Service
Identity
AKS NodePool VMSS
Azure AKS
AGIC
Ingress + External DNS
Basic Demo
This (spec.rules.host) adds DNS Record Set in Azure DNS Zones using k8s External DNS
© Kalyan Reddy Daida StackSimplify
Demo-16
Azure AKS
AGIC
Ingress + External DNS
Domain Name Routing
eapp2.kubeoncloud.com App1
AppGW Public IP Application
Gateway eapp3.kubeoncloud.com
DNS
Zones
App2
Managed
Service
Identity
AKS NodePool VMSS External DNS App3
Azure AKS
AGIC
Ingress + External DNS + SSL
Ingress TLS
Managed TLS
Service (spec.tls.secretName)
Identity External DNS
AKS NodePool VMSS Ingress Service
In AppGW,
these
Listener
settings
will be
applied
Azure AKS
AGIC
Ingress + External DNS + SSL
Ingress TLS + SSL Redirect (HTTP to HTTPS)
Managed TLS
Service (spec.tls.secretName)
Identity External DNS
AKS NodePool VMSS Ingress Service
Rule will be
created for Port 80
Listener where
Permanent
Redirection is
enabled
Azure AKS
AGIC
Ingress + External DNS + SSL
Upload SSL Certs to Application Gateway
Reference AppGw Certs in Ingress Service
SSL PFX
SSL Cert
Managed
Service SSL Key
Identity
AKS NodePool VMSS
External DNS
Reference SSL
Certificate uploaded
to AppGw using
appgw-ssl-certificate
Annotation
Azure AKS
AGIC
Ingress + External DNS + E2E SSL
Build Backend SSL Application
LB Public IP HTTPS
Backend SSL
SSL Cert
SSL Key Backend
K8s Secret
MyApp
Azure
Load Balancer
Azure AKS
AGIC
Ingress + External DNS + E2E SSL
Implement E2E SSL
External DNS
Backend Application
Port is 443
Azure AKS
AGIC
Ingress + External DNS + SSL
Cert Manager + Lets Encrypt
Automatic Generation of Real and
Free SSL Certs
© Kalyan Reddy Daida StackSimplify
Azure AGIC - Ingress SSL with Let's
Azure Cloud Encrypt
https://sapp1.kubeoncloud.com
Virtual Network (10.224.0.0/12) cert-manager.io/cluster-issuer: letsencrypt
https://sapp2.kubeoncloud.com
Subnet: 10.225.0.0/16 Subnet: 10.224.0.0/16
Users AKS
HTTP -> HTTPS
sapp1.kubeoncloud.com Cluster SSL Cert
Azure AKS
AGIC
Ingress + WAF
Enable WAF on Application Gateway
WAF Default OWASP Policies
Default
OWASP
Policies
WAF
Azure AKS
AGIC
Ingress + WAF
Enable WAF on Application Gateway
WAF Custom Policy
Azure AKS
AGIC
Ingress
Private IP Annotation
AKS Cluster
Test User
curl http://private-ip
curl pod
Application Gateway
appgw.ingress.kubernetes.io/use-private-ip: "true"
Private IP /
AppGW Public IP
Echo Server
Azure AKS
AGIC
Multiple Ingress Controllers
AGIC + Nginx
Ingress Class
AKS Cluster
LB Public IP
NGINX Ingress Controller App1
Application Gateway
Users
/
App2
AppGW Public IP
NGINXIC AGIC
Azure AKS
AGIC
Install AGIC using Helm
AKS Cluster
AppGW
Public IP
Application
3 Gateway
2 1
Azure Resource
AGIC Ingress Controller k8s API Server
Manager
Azure AKS
AGIC
Shared Application Gateway
Subnet: 10.225.0.0/16
myaciapp1
myaciapp1.kubeoncloud.com
myaciapp2.kubeoncloud.com
Users
myaciapp2
App1
Azure AKS
AGIC
Watch Namespaces
AppGW App1
Public IP
/app1
Namespace: Production
/app2
Application
Gateway App2
AppGW App1
Public IP
Namespace: Production
/app2
Application
Gateway App2