IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing...
Transcript of IVAN...HELM CHARTS What are Helm charts, when use existing, when create your own? Use existing...
Awesome CI / CDfor applications
running on Kubernetes
IVANILVES
© 2019 Binlogic.
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
CI CD
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
© 2019 Binlogic.
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
© 2019 Binlogic.
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
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
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
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
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
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
● 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
● 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?
Q/A● GitHub: @ivanilves● Twitter: @ivanilves
© 2019 Binlogic.