Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Scaling containers with AKS and ACI

Nilesh Gule
September 06, 2020

Scaling containers with AKS and ACI

Slide deck from the virtual session for Dear Azure community in India. During the session, we covered the containerizing .net Core application, publish Docker images to private Azure Container Registry (ACR). These containers images are deployed to Azure Kubernetes Service cluster. Using Helm we deploy RabbitMQ and KEDA on the Kubernetes cluster. Finally, we extend the autoscaling to serverless environment with Azure Container Instances (ACI) and virtual node

The recording of the session is available on YouTube
https://youtu.be/ib-Jpfg6Iuk?WT.mc_id=DP-MVP-5003170

Nilesh Gule

September 06, 2020
Tweet

More Decks by Nilesh Gule

Other Decks in Technology

Transcript

  1. $whoami { “name” : “Nilesh Gule”, “website” : “https://www.HandsOnArchitect.com", “github”

    : “https://GitHub.com/NileshGule" “twitter” : “@nileshgule”, “linkedin” : “https://www.linkedin.com/in/nileshgule”, “likes” : “Technical Evangelism, Cricket”, “co-organizer” : “Azure Singapore UG” }
  2. @nileshgule Containerize .Net Core App Build & publish Docker images

    to private Azure Container Registry (ACR) Autoscale using k8s K8s deployment, KEDA autoscaling, extending to serverless Azure Container Instences (ACI) Application Overview Docker Images Container Registries Kubernetes deployment Autoscaling with KEDA Serverless container with ACI Agenda
  3. @nileshgule RabbitMQ Demo – Producer & Consumer 1000 (configurable) messages

    Batch of 50 (configurable) messages https://github.com/NileshGule/pd-tech-fest-2019
  4. @nileshgule Docker – main features Security Process isolation, resource limits

    Portability Runs across multiple env with Docker runtime Performance Smaller footprint than VM, lightning fast Multi-cloud Deploy Docker images to multi-cloud environments Isolation Isolates multiple versions of dependencies Agility Integrates into CI CD pipelines
  5. @nileshgule RabbitMQ Demo – Docker Images https://github.com/NileshGule/pd-tech-fest-2019  Docker multi-stage

    builds  Docker-compose, build & publish multiple images  Azure Container Registry (ACR) private registry
  6. @nileshgule Kubernetes – main features Self healing Restart / Replace

    / kill containers based on heath checks Service discovery & LB Expose container using DNS name or IP Secrets & Config Mgt Manage sensitive info (pwd / Oauth tokens / SSH keys etc) Auto bin packing Fits containers to nodes based on resource limits Storage Orchestration Mount storage from local, public cloud oro ther sources Auto rollout & rollback Desired state configuration to manage rollouts & upgrades
  7. @nileshgule RabbitMQ Demo – Kubernetes deployment https://github.com/NileshGule/pd-tech-fest-2019  Manifest files

    describe Deployment and Service  Helm charts to deploy third-party apps / services  Octant – visualize k8s cluster  Kubectl to deploy Manifest
  8. AKS Managed Identity (aksmqcluster-agentpool) nileshgule/techtalksmqproducer nileshgule/techtalksmqconsumer ngACRRegistry aksmqCluster ngacrregistry.azurecr.io/nileshgule /techtalksmqproducer

    ngacrregistry.azurecr.io/nileshgule/ techtalksmqconsumer Acr pull acrResourceGroup demo-kedaSeriesRG docker push using azure user token Acr login using AAD No need to use Admin user
  9. Azure Event Hub Azure Service Bus Queues and Topics Azure

    Storage Queues Kafka Prometheus RabbitMQ Redis Lists Liiklus NATS AWS CloudWatch AWS Simple Queue Service GCP PubSub Integrates with Azure functions
  10. @nileshgule RabbitMQ Demo – KEDA Event driven autoscaling  RabbitMQ

    event source  KEDA autoscaler to scale consumer deployment 1000 (configurable) messages Batch of 50 (configurable) messages https://github.com/NileshGule/pd-tech-fest-2019
  11. apiVersion: keda.k8s.io/v1alpha1 kind: ScaledObject metadata: name: rabbitmq-consumer namespace: default labels:

    deploymentName: rabbitmq-consumer-deployment spec: scaleTargetRef: deploymentName: rabbitmq-consumer pollingInterval: 5 # Optional. Default: 30 seconds cooldownPeriod: 30 # Optional. Default: 300 seconds minReplicaCount: 1 # Optional. Default: 0 maxReplicaCount: 30 # Optional. Default: 100 triggers: - type: rabbitmq metadata: queueName: hello queueLength : ‘5’ authenticationRef: name: trigger-auth-rabbitmq-host
  12. Summary • Self contained application with all its dependencies Docker

    • Orchestrates containers • Self healing • Service discovery • Scaling Kubernetes • Extends Kubernetes with event driven capabilities KEDA
  13. AKS cluster-autoscalar Virtual Node Horizontal pod autoscale virtual kubelet KEDA

    https://azure.microsoft.com/mediahandler/files/resourcefiles/kubernetes-learning- path/Kubernetes%20Learning%20Path%20version%201.0.pdf
  14. Thank you very much Code with Passion and Strive for

    Excellence https://www.slideshare.net/nileshgule/presentations https://speakerdeck.com/nileshgule/
  15. Nilesh Gule ARCHITECT | MICROSOFT MVP “Code with Passion and

    Strive for Excellence” nileshgule @nileshgule Nilesh Gule NileshGule www.handsonarchitect.com
  16. Q&A