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

Dynamic Environments Using Helm and Kubernetes

Dynamic Environments Using Helm and Kubernetes

Lucas Santos

May 19, 2020
Tweet

More Decks by Lucas Santos

Other Decks in Technology

Transcript

  1. Dynamic Environments
    Using #Helm and #Kubernetes

    View Slide

  2. cloud advocate_
    quem sou eu_
    /khaosdoctor @_staticvoid
    lsantos.dev
    /khaosdoctor
    [email protected]

    View Slide

  3. obarra.co
    trainingcenter.io

    View Slide

  4. Development teams_

    View Slide

  5. Team
    Code Tests Staging
    QA

    View Slide

  6. The problem_

    View Slide

  7. Dev
    Code Tests
    Dev
    Testing...
    Staging

    View Slide

  8. The perfect world_

    View Slide

  9. Dev 2
    Code Tests
    Staging 2
    Dev 1
    Dev 3
    Staging 1
    Staging 3

    View Slide

  10. How to achieve this?

    View Slide

  11. View Slide

  12. - Container Orchestrator
    - Developed by Google in 2000
    - Scaling, state and version
    management
    - Cluster based
    - Declarative

    View Slide

  13. - Kubernetes package manager
    - Allows for manifest files to be
    grouped into Charts
    - Templating
    - Easier way to create and tear
    down environments

    View Slide

  14. How do we start_?

    View Slide

  15. We create a Helm chart for our
    application

    View Slide

  16. helm create

    View Slide

  17. View Slide

  18. Chart.yaml

    View Slide

  19. View Slide

  20. helm install

    View Slide

  21. The CI_

    View Slide

  22. View Slide

  23. View Slide

  24. View Slide

  25. View Slide

  26. View Slide

  27. Demo

    View Slide

  28. Design patterns_

    View Slide

  29. Design Patterns
    - Manual testing environments by branch
    - Automatic testing environment by PR on release branch
    - Automatic testing environment by a "RC" tag
    - Automatic testing environment at each new version
    - Hybrid using manual branching with PRs on release

    View Slide

  30. tips_

    View Slide

  31. tips_
    - Tearing down an environment is equally important as creating one
    - Do NOT use the production database (yeah… It happened)
    - Not all features need a testing environment
    - Make the environment creation and destruction as a manual approach
    - Do NOT use production passwords anywhere else (yeah… It also happened)
    - Keep it simple
    - Don't early-optimise

    View Slide

  32. referências_
    - helm.sh
    - kubernetes.io
    - dev.azure.com/lsantos-projects/helm-dynamic-envs
    - github.com/khaosdoctor/helm-dynamic-envs
    - helm.sh/docs/developing_charts/
    - helm.sh/docs/chart_template_guide/

    View Slide

  33. referências_
    - https://aka.ms/aks-workshop-intro
    - https://aka.ms/helm-intro
    - https://aka.ms/helm-charts-intro
    - https://aka.ms/helm-az-cr
    - https://aka.ms/az-devops-docs
    - https://aka.ms/az-kubernetes
    - https://aka.ms/az-aks-tutorial

    View Slide

  34. /khaosdoctor @_staticvoid
    lsantos.dev
    /khaosdoctor
    obrigado_

    View Slide