Kubernetes On Azure
Kubernetes On Azure
Content ## Introduction
## Kubernetes on Azure overview
## Top scenarios
## Customer stories
## Resources
What is a container?
VM VM Containers Containers
App1 App2
App1 App1
Binaries & Binaries &
libraries libraries Binaries & Binaries &
libraries libraries
Guest OS Guest OS
Hypervisor
Host OS
Hardware
Advantages of a containerized environment
Hypervisor
Docker Engine
Host OS
Hardware
Secure DevOps
</>
s s Delivery nt
Integratio strategies
n
• Accelerate the feedback
loop with constant Monitor &
monitoring logging
Secure
Azure AKS dev Monitor
sample code {
DevSpaces cluster
Testiterating.with.tea
m
9
DevOps </>
Debug
// in one
// isolated
environment
App
telemetry
Container
health
Real-time
log
analytics
}
Capabilities 8
1. Developers rapidly iterate, test, and debug different 3
parts of an application together in the same
Kubernetes cluster 2 Azure AKS
5
2. Code is merged into a GitHub repository, after which Source Container production
automated builds and tests are run by Azure code control Registry cluster Azure
Pipelines
3. Container image is pushed to Azure Container
Scan Runtim Policy
Registry e
4. Kubernetes clusters are provisioned using tools like
Terraform; Helm charts, installed by Terraform, define Release
3
the desired state of app resources and configurations Container
image
5. Operators enforce policies to govern deployments
to the AKS cluster
v1
4 v2
6. Release pipeline automatically executes pre-defined
deployment strategy with each code change
SCA SAST
7. Policy enforcement and auditing is added to CI/CD Azure
CI/CD 7
Accept
Deny
pipeline using Azure Policy Pipelines Helm chart Terraform
8. App telemetry, container health monitoring, and
real-time log analytics are obtained using Azure Release
N
3
2
1
Monitor
9. Insights used to address issues and fed into next 6
sprint plans
Introduction
20 B y
22
>75%
of global organizations
will be running
containerized
applications in
production1
1
Gartner.
What’s behind the growth?
Kubernetes: the leading orchestrator shaping the future app development and
management
1
Kubernetes.io. “Kubernetes User Case Studies.” 2CNCF. “Kubernetes Is First…” 3CNCF. Keynote
address.
Kubernetes: the industry-leading orchestrator
DevOp AKS
s
AKS DevOps
Kubernetes on its own is not enough
Save time from infrastructure management and roll out updates faster without
compromising security
Developmen Platform
Unlock the agility for containerized t
applications using: IDE
container
support Governanc
Security Identity
• e
Infrastructure automation that
simplifies provisioning, patching, and <\> Source code
repository
upgrading
Microservic
e Storage Data
debugging
Containers in Azure
Kubernetes Container
App Service Service Fabric Container Apps Ecosystem
Service Instance
Deploy web Modernize .NET Scale and Elastically burst Fully managed Bring your
apps or APIs applications to orchestrate Linux from your Azure serverless Partner
using microservices containers using Kubernetes container service solutions that
containers in a using Windows Kubernetes Service (AKS) run great on
PaaS Server cluster Azure
environment containers
Commercial distributed K
Kubernetes on Azure overview
Azure Kubernetes Service (AKS)
Ship faster, operate easily, and scale confidently with managed Kubernetes on Azure
30x
Azure Kubernetes Service
usage grew 30x since it was
made generally available in June
2018
Dated November 2018
How Kubernetes works
Kubernete
s control Worker node
Internet
kubelet kube-proxy
1. Kubernetes users
communicate with API Docker
server and apply desired Master node
state Prod Prod
replication,
4. Worker nodes support namespace,
serviceaccounts, etc. etcd
communication from the
Internet Docker
Prod Prod
Containers Containers
Manage Kubernetes with ease
Infrastructure automation
• Automated provisioning,
Self-managed master node(s)
upgrades, patches App/
workload Kubernetes etcd
User definition API endpoint API server Store
• Self-healing
Scaling
logging
Customer Microsoft
Azure Kubernetes Service
Simplify the deployment, management, and operations of Kubernetes
Azure Monitor
Azure Container
AKS production cluster Instances (ACI)
Microservices Pods
Serverless Kubernetes
No infrastructure to
Virtual manage
node Starts in seconds
͏Operate
• Out-of-box control plane telemetry, log
aggregation, and container health
• Declarative resource management
• Auto scaling
Secure your Kubernetes environment with layers of isolation
Control access through Safeguard keys and Secure network Compliant Kubernetes
secrets with Key Vault communications with service with certifications
AAD and RBAC VNET and policy for SOC, HIPAA, and PCI
Scale applications on the fly
Take advantage
of services and
tools in the
Kubernetes
ecosystem
Virtual kubelet
CNAB
Contain
DevOps er
Leverage 100+ Registr
VS Azure Azure Azure y
turn-key Azure Code ARM Monitor VNET Storage
services
Entra
ID
Azure
Policy
Key
Vault
Azure makes Kubernetes easy
Deploy and manage Kubernetes with ease
Build a containerized app Build the app draft init to configure your environment
and deploy to Kubernetes Write a Dockerfile draft create to auto-create Dockerfile/Helm chart
Build the container image draft up to deploy to Kubernetes
Push the container to a registry
Write Kubernetes manifests/Helm chart
Deploy to Kubernetes
Inner loop development Set up a local dev environment using Minikube Use Dev Spaces
Determine the transitive closure of your Do breakpoint debugging in your IDE
dependencies
Identify behavior of dependencies for key test cases
Stub out dependent services with expected behavior
Make local changes, check-in, and hope things work
Validate with application logs
Expose web apps to the Deploy an ingress controller Turn HTTP application routing on in your cluster
internet with a DNS entry Create a load-balanced IP for it Add an ingress resource to your deployment
Add an ingress resource to your deployment
Acquire a custom domain
Create a DNS A-record for your service
Azure makes Kubernetes easy
Roll out new features seamlessly (CI/CD)
Set up a CI/CD pipeline Create Git repo Create a project on Azure DevOps with
and deploy to Kubernetes Create a build pipeline Kubernetes/AKS as a target
Create a container registry
Create a Kubernetes cluster
Configure build pipeline to push to container registry
Configure build pipeline to deploy to Kubernetes
Define and set up deployment strategy
Make container images Create a container registry in every region Create an Azure Container Registry with geo-
available for deployment Configure build pipeline with multiple endpoints replication
worldwide Push your image to a single endpoint
Loop through all regions and push following build
Track health with Choose a logging solution Checkbox “container monitoring” in the Azure portal
consolidated cluster and Deploy log stack in your cluster or provision a
application logs service
Configure and deploy a logging agent onto all nodes
Build on a secure, enterprise-grade platform
Azure
Storage
Azure VNet
Active
Entra ID SQL
Synced identity
Directory
Node Node Database
Pod Pod
App Gateway
Kubernetes cluster: Azure VNET
Internal
Load Balancer
External
DNS
Ingress
Control plane
Controller
Namespace
Governance
Dynamically enforce guardrails defined in Azure Policy across multiple clusters—nodes,
pods, and even container images can be tracked and validated at the time of deployment
or as part of CI/CD workflows
Cloud Azure
Architect Policy
Compliance reports
Assigns a policy
Cluster-1 Cluster-2 Cluster-3 across clusters
Container Region
Environment
commits contributors
AKS is certified Kubernetes conformant, ensuring portability and interoperability of your container
workloads
Microsoft contributions to the community
Containerd CNAB
Packaging
& distribution Helm Duffle
tooling Brigade
Microsoft contributions to the community
Top
code contributor to
55,000
monthly downloads of Helm
68%
of Kubernetes users prefer
Windows support in Helm
Kubernetes
1 of 3 3x
Created the
Illustrated Children’
s Guide to Kuberne
tes
top corporate growth of employee
, now part of CNCF
contributors contributors within three
years
Top scenarios
Lift and shift to Microservices Secure Machine IoT Data
containers DevOps learning streaming
• Speed application
deployments by using
Kubernetes cluster
container technology
Existing Container Modernize Modernize Modernize
application Registry CI/CD d d d
application application application
• Defend against
infrastructure failures with
container orchestration
continuous delivery
Lift and shift to Microservices Secure Machine IoT Data
containers DevOps learning streaming
Capabilities
1. Use Azure Container Registry to store Virtual network
container images and Helm charts
for your modernized applications, Active
Directory
replicated globally for low latency
image serving
2. Integrate AKS with Azure Pipelines or 1 3
other Kubernetes ecosystem tooling Azure
2
to enable continuous Existing Container CI/CD Azure
application Registry Pipelines Database
integration/continuous delivery AKS for MySQL
(CI/CD)
3. Enhance security with Azure Active
Directory and RBAC to control access
to AKS resources
Lift and shift to Microservices Secure Machine IoT Data
containers DevOps learning streaming
https://github.com/Microsoft/
SmartHotel360-AKS-DevSpaces-Demo
Lift and shift to Microservices Secure Machine IoT Data
containers DevOps learning streaming
Secure DevOps
</>
s s Delivery nt
Integratio strategies
n
• Accelerate the feedback
loop with constant Monitor &
monitoring logging
Inner loop
1 Azure
Secure
Azure AKS dev Monitor
sample code {
DevSpaces cluster
iterating.with.tea
Test
m
9
DevOps </>
Debug
// in one
// isolated
environment
App
telemetry
Container
health
Real-time
log
analytics
}
Capabilities 8
1. Developers rapidly iterate, test, and debug different 3
parts of an application together in the same
Kubernetes cluster 2 Azure AKS
5
2. Code is merged into a GitHub repository, after which Source Container production
automated builds and tests are run by Azure code control Registry cluster Azure
Pipelines Policy
3. Container image is pushed to Azure Container
Registry
4. Kubernetes clusters are provisioned using tools like
Terraform; Helm charts, installed by Terraform, define Release
3
the desired state of app resources and configurations Container
image
5. Operators enforce policies to govern deployments
to the AKS cluster
v1
4 v2
6. Release pipeline automatically executes pre-defined
deployment strategy with each code change
Serve the
• Consistent environment model
Data
across test, control and Scientist
production
Compute
Developer
<\>
https://github.com/Azure/kubeflow-labs
Lift and shift to Microservices Secure Machine IoT Data
containers DevOps learning streaming
App
developer
ML model in
1. Package ML model into a container containers
and publish to Azure Container
2. Registry
Azure Blob Storage hosts training 1
data sets and trained model Azure
Data Container
3. Use Kubeflow to deploy training job scientist Registry
3 Serve the
model in
to AKS, distributed training job to 4 production
Kubeflow GPU-
AKS includes Parameter servers and
Parameter Worker enabled
Worker nodes server node nodes VMS
2
4. Serve production model using
Azure
Kubeflow, promoting a consistent 5
Blob
environment across test, control and Storage
production
5. AKS supports GPU enabled VM
6. Developer can build features
querying the model running in AKS
cluster https://github.com/Azure/kubeflow-labs
Lift and shift to Microservices Secure Machine IoT Data
containers DevOps learning streaming
Azure
SQL Cosmos Database
Database DB for MySQL
Lift and shift to Microservices Secure Machine IoT Data
containers DevOps learning streaming
1. ͏Azure IoT Edge encrypts data and send Azure Azure IoT Edge
to
Azure, which then decrypts the data and
send to storage Kubernetes cluster
2
2. ͏Virtual node, an implementation 4
of Virtual Kubelet, serves as the Node Node Virtual node
translator between cloud and Edge Docker
Docker Docker Docker Docker container
Docker IoT Edge
container container container container container
s Provider 3
3. ͏IoT Edge Provider in virtual node
redirects containers to IoT Edge and
extend AKS cluster to target millions of
edge devices
4. Consistent update, manage, and
monitoring as one unit in AKS using
single pod definition
Lift and shift to Microservices Secure Machine IoT Data
containers DevOps learning streaming
Analysis
Service Mesh
Service Mesh
Capabilities Asynchronous 4
Interface
Apache
Kafka HDInsight
CI/CD Analysis
1. ͏Sensor data is generated and streamed to Azure API service
GitHub Pipelines ACR
Management Hot path
Processing
2. ͏AKS cluster runs microservices that are deployed service
as containers behind a service mesh; containers are
built using a DevOps process and stored in Azure 5
Container Registry 6
3. ͏Ingest service stores data in an Azure Cosmos DB Splunk
Virtual
Machines
Typical 3-tier Customer Customer Customer
architecture using VMs A B C
Internet
Typical 3-tier
architecture using VMs AKS
App Gateway
1. Azure Pipelines for
automation and CI/CD
pipelines; adding Terraform Firewall
for further automation Data On-
Internal
Queuing
Results
<\>
Challenge: Altair needed a specialized HPC architecture — Sam Mahalingam, Chief Technical
Officer Cloud Computing and High-
containing high-performance graphics processing
Performance Computing Strategy,
units to deliver their latest topology optimization Altair Engineering
and analysis application to customers.
Commercial distributed K
Compete
How to compete?
1
CNCF. 2Microsoft..
Resources
Best support for your enterprise need
cAdvisor
Collects
metrics from
all nodes
Cluster Autoscaler
The cluster autoscaler watches for pods that can't be scheduled on nodes because of
resource constraints. The cluster then automatically increases the number of nodes.
Cluster
1. ͏HPA obtains resource metrics Azure Autoscaler Pod Pod
and compares them to user-
specified threshold 2 1
Deep traceability
1. ͏As part of the CI, developers check in their 3
code to a central repository; Azure pipelines Source
Repositor Container
automatically build application binaries, run y image Pod
unit test, and push container image into a
registry
2. ͏Developers then deploy the application to
a testing environment and run integration
test as part of the CD workflow
Azure
Source Azure Pipelines AKS
3. ͏Developers can review which pod is
code 1 Pipelines Build 2 Release 4 cluster
running which container image, what source
code is built into an image, and what tests Continuou Continuou Deploy
s s Delivery strategies
are run against each image at any point of </> Integratio
n
time
4. ͏For production deployment, Azure Pipelines
automatically execute pre-defined
deployment strategy and progressively roll Azure
out application to Monitor
an AKS cluster
5. ͏Enable app telemetry, container health
monitoring, and real-time log analytics; Iterate 5 Monitor
Pods Pods
• No infrastructure to manage
Virtual
node
Kubernetes-based event-driven auto-scaling (KEDA)
Kubernetes
Internal External
User User
Security overview
Azure
Container App Gateway
Registry AKS with RBAC
Developer Internal External
1. ͏Image and container level 1 Load Load
security Balancer Balancer
• AAD authenticated Container
registry access
• ACR image scanning and content
trust for image validation Azure VNet
2. ͏Node and cluster level
Kubernete
security Active Ingress Ingress External
s Admin
Controller Controller DNS
• Automatic security patching nightly Directory
• Nodes deployed in private virtual Node Node
network subnet w/o public addresses
• Network policy to secure Pod Pod
communication paths between
namespaces (and nodes) 2
3
• Pod Security Policies AAD Pod Identity
3. • ͏Pod leveland
K8s RBAC security
AAD for
• Pod
authentication using AAD Pod
level control Azure
Identity Key Vault
• Pod Security Context 4
4. ͏Workload level security Azure SQL
• Azure Role-based Access Control Storage Database Cosmos DB
(RBAC) & security policy groups
• Secure access to resources &
services
(e.g. Azure Key Vault) via Pod
Identity
• Storage Encryption Encrypted Storage
• App Gateway with WAF to protect
Pod identity
Developer
2
Secure network communications with VNET and CNI
On-premises
1. Uses Azure subnet for both your 1 infrastructure
containers and cluster VMs 3
Azure VNet A Enterpris
Backend e system
services
2. Allows for connectivity to existing AKS subnet subnet Azure
Azure services in the same VNet Express
AKS cluster SQL Server Route
4
AKS VNet integration works seamlessly
4
policy
4. Cloud architect obtains
compliance report for the entire
environment and can drill down
to individual pod level
Develop AKS
er
3 Cluster-1 Cluster-2 Cluster-3
2
Azure Pipelines build audit & enforcement using Azure Policy
Visualization
Visualize overall health and
performance from clusters to
containers with drill downs and
Observability filters
Insights
Provide insights with multi-cluster
Azure Kubernete Azure Monitor
s control for containers
health roll up view
Pipelines
Observability
Observe live container logs on
container deployment status
Azure Monitor for containers
4
3
2
1