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

Kubernetes Blue-Green Deployment Made Easy with Argo Rollouts - ADDO

Kubernetes Blue-Green Deployment Made Easy with Argo Rollouts - ADDO

Hossam Barakat

October 27, 2021
Tweet

More Decks by Hossam Barakat

Other Decks in Programming

Transcript

  1. Kubernetes Blue-Green Deployment
    Made Easy with Argo Rollouts
    Hossam Barakat
    Engineering Manager at Willow
    @hossambarakat_ | www.hossambarakat.net

    View Slide

  2. @hossambarakat_
    • What is Argo Rollouts
    • Argo Rollouts Concepts
    • Blue-Green Deployment
    • Canary Deployment
    Agenda

    View Slide

  3. @hossambarakat_
    Deployment
    ReplicaSet
    Deployment
    Pod Pod

    View Slide

  4. @hossambarakat_
    • RollingUpdate
    • Recreate
    K8s Deployment Strategies

    View Slide

  5. @hossambarakat_
    Deployment Strategy - RollingUpdate
    Deployment
    ReplicaSet V2
    Pod Pod
    ReplicaSet V1
    Pod Pod

    View Slide

  6. @hossambarakat_
    Deployment Strategy - Recreate
    Deployment
    ReplicaSet V2
    Pod Pod
    ReplicaSet V1
    Pod Pod

    View Slide

  7. @hossambarakat_
    • Limited controls over the speed of the rollout
    • Inability to control traffic flow to the new version
    • No ability to query external metrics to verify an
    update
    • Unable to automatically abort and rollback the
    update
    K8s Deployment Challenges

    View Slide

  8. @hossambarakat_
    • Argo Rollouts is a Kubernetes controller and set
    of CRDs which provide advanced deployment
    capabilities such as blue-green, canary, canary
    analysis, experimentation, and progressive delivery
    features to Kubernetes.
    What is Argo Rollouts?

    View Slide

  9. @hossambarakat_
    • Controller and Custom Resource Definitions (CRDs)
    $ kubectl create namespace argo-rollouts
    $ kubectl apply -n argo-rollouts -f install.yaml
    • Kubectl argo rollouts plugin
    $ brew install argoproj/tap/kubectl-argo-rollouts
    $ kubectl argo rollouts version
    Installation

    View Slide

  10. @hossambarakat_
    • A drop-in replacement for a Deployment resource.
    • Provides additional blue-green and canary update
    strategies.
    • Automates promotion and rollback based on analysis
    results.
    Rollout

    View Slide

  11. @hossambarakat_
    Rollout
    ReplicaSet
    Deployment
    Pod Pod
    Rollout

    View Slide

  12. @hossambarakat_

    View Slide

  13. @hossambarakat_
    Blue-Green Rollout

    View Slide

  14. @hossambarakat_
    Blue-Green Rollout
    Users

    View Slide

  15. @hossambarakat_
    Blue-Green Rollout
    Users

    View Slide

  16. @hossambarakat_
    Blue-Green Rollout
    ReplicaSet
    Rollout
    Pod Pod
    Service
    Ingress

    View Slide

  17. @hossambarakat_
    Blue-Green Rollout
    Rollout
    ReplicaSet V2
    Pod Pod
    ReplicaSet V1
    Pod Pod
    Active Service
    Ingress
    Preview Service

    View Slide

  18. @hossambarakat_

    View Slide

  19. @hossambarakat_
    Canary Rollout

    View Slide

  20. @hossambarakat_
    Canary Rollout
    Users

    View Slide

  21. @hossambarakat_
    Canary Rollout
    Users

    View Slide

  22. @hossambarakat_
    Canary Rollout
    Users

    View Slide

  23. @hossambarakat_
    Canary Rollout
    Users

    View Slide

  24. @hossambarakat_
    Canary Rollout
    Users

    View Slide

  25. @hossambarakat_
    Traffic Provider Integrations
    Optional

    View Slide

  26. @hossambarakat_
    Rollout Canary with NGINX
    Rollout
    ReplicaSet V2
    Pod Pod
    ReplicaSet V1
    Pod Pod
    Stable Service
    Ingress
    Canary Service
    Canary Ingress

    View Slide

  27. @hossambarakat_
    Rollout Canary with NGINX
    Rollout
    ReplicaSet V2
    Pod Pod
    ReplicaSet V1
    Pod Pod
    Stable Service
    Ingress
    Canary Service
    Canary Ingress

    View Slide

  28. @hossambarakat_
    Rollout Canary with NGINX
    Rollout
    ReplicaSet V2
    Pod Pod
    ReplicaSet V1
    Pod Pod
    Stable Service
    Ingress
    Canary Service
    Canary Ingress

    View Slide

  29. @hossambarakat_

    View Slide

  30. @hossambarakat_
    • What metrics to measure and its frequency
    • What values are considered successful or failed
    • Continuously run in the background.
    Analysis

    View Slide

  31. @hossambarakat_
    Metric Provider Integration

    View Slide

  32. @hossambarakat_

    View Slide

  33. @hossambarakat_
    Questions?

    View Slide

  34. Thanks
    Hossam Barakat
    @hossambarakat_
    www.hossambarakat.net

    View Slide