22
Awesome CI / CD for applications running on Kubernetes IVAN ILVES © 2019 Binlogic.

IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is

Awesome CI / CDfor applications

running on Kubernetes

IVANILVES

© 2019 Binlogic.

Page 2: IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is

WHAT IT’S ALL ABOUT?CI/CD pipelines for applications running on Kubernetes

● Difference from a “normal” CI/CD

● Helm and Helm charts, why these are important?

● A handful tips and tools

Page 3: IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is

CI CD

Page 4: IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is

CICDContinuous Integration / Continuous Deployment

● Practices that help developers to deliver value faster and safer

● Set of actions that run after code changes or on the time basis

● “One-stop shop” to build, test, deploy and analyze your software

Page 5: IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is

© 2019 Binlogic.

Page 6: IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is

KUBERNETESThe biggest hype in tech industry since … I don’t remember what ...

● Leading container orchestration system, … and it’s open source!

● Uniform API to manage both your applications and infrastructure

● A way to make your company’s tech ecosystem great ...

● … a way to elegantly waste tons of time, effort and money

Page 7: IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is

© 2019 Binlogic.

Page 8: IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is
Page 9: IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is

WHY KUBERNETES?Why do I need this piece of technology? What are my benefits?

● Manage all your resources programmatically with a single API

● Complete, reproducible environments with declarative manifests

● Higher abstraction level, you can create cloud-agnostic setups

Page 10: IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is
Page 11: IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is

ANY REAL DIFFERENCE?How CI/CD for Kubernetes is different from a “normal” CI/CD?

● You work with a single, uniform API (“Cloud-Native English”)

● Feedback looks are significantly shorter (seconds vs minutes)

● Usually you take an existing slice of resources from a shared pool

● The only artifact you produce is an application Docker image

Page 12: IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is
Page 13: IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is

WHAT THE HELM?What are Helm charts, when to use existing, when to create own?

● Package manager for Kubernetes, the first and the most popular

● Tool to render Kubernetes YAML templates against any value sets

● Chart repositories provide you with ready to use building blocks:

● public https://github.com/helm/charts private https://chartmuseum.com

Page 14: IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is
Page 15: IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is

HELM CHARTSWhat are Helm charts, when use existing, when create your own?

● Use existing charts if possible, it’s hard to maintain your own!

● In case no specialized chart is available, nice “one-size-fits-all”:

● github.com/cloudposse/charts/tree/master/incubator/monochart

● If you created your own, try to make it generic and open source

Page 16: IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is

STAGING FOR THE WINEphemeral staging environments, create as many as you need!

● You deploy into a shared resource pool, deployments are cheap

● Helm comes to play here, with per-environment values & secrets

● Ephemeral: deploy into an exclusive namespace, scrap it at night

● Spot instances for the staging cluster: https://t.co/y3OLAIywuM

Page 17: IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is

IMAGE SEPARATIONSeparation of base and code images, why it is important?

● Stick to a few base images, use these base images to build all your apps

● Prefer public base images, otherwise take serious care of your ones

● Make your application image build manifest as small as possible:∙ for build speed, runtime security, and overall manageability

Page 18: IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is
Page 19: IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is

● kubeval https://github.com/instrumenta/kubeval

● helmfile https://github.com/roboll/helmfile

● dive https://github.com/wagoodman/dive

● KIND https://github.com/kubernetes-sigs/kind

● draft https://github.com/Azure/draft

Great tools that can improve your developer experience

Page 20: IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is

● Kubernetes is complex and messy, but gives you a lot of power ;)

● Whatever cloud resource exists, there is a Kubernetes object for it

● Kubernetes CI/CD is blazingly fast comparing with EC2/GCP/AVM

● Helm allows you to manage YAML and brings ready-to-use blocks

● Don’t just use raw YAMLs, use some tooling to deploy properly

CONCLUSIONS?

Page 21: IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is

Q/A● GitHub: @ivanilves● Twitter: @ivanilves

Page 22: IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing charts if possible, it’s hard to maintain your own! In case no specialized chart is

© 2019 Binlogic.