$30 off During Our Annual Pro Sale. View Details »

Managing Applications with Helm - OSS EU '17

Managing Applications with Helm - OSS EU '17

This presentation is on the basics of Helm and Draft. Presented at OSS EU 2017 in Prague

Michelle Noorali

October 23, 2017

More Decks by Michelle Noorali

Other Decks in Technology


  1. Highway to Helm Developing and Managing Applications in Kubernetes by

    Michelle Noorali and Matt Butcher @michellenoorali, @technosophos
  2. Michelle Noorali Microsoft. Helm and Draft. Kubernetes SIG- Apps. Kubernetes

    Steering Committee. Go and Ruby. Making distributed systems digestable.
  3. Matt Butcher Microsoft. Helm, Brigade, Draft, and a bunch of

    other projects. Author of Go in Practice, Illustrated Children’s Guide to Kubernetes, and a bunch of other books. Teaches at Loyola University Chicago.
  4. Kubernetes • Cluster management software • Based on Google's experience

    of running containers in production for about 15 years • Container orchestrator • System for automating deployment, scaling, and management of containerized applications • Has its own primitives (aka resources) • Pods, Deployments, Services, etc. • Declarative
  5. Deis • Container PaaS on Kubernetes • Developer self-service •

    Heroku for your Kubernetes cluster
  6. When deploying applications to Kubernetes, you'll likely create a set

    of Kubernetes resources that work together to host and run your application container(s)
  7. YAML, YAML, YAML • YAML for Kubernetes Deployment • YAML

    for Kubernetes Service • YAML for Kubernetes Secrets • YAML for Kubernetes ConfigMaps • Give Kubectl a manifest and it'll create a Kubernetes resource
  8. How do you manage a set of related resources in

  9. We needed a tool to manage a group of related

    resources in Kubernetes as one unit
  10. Helm A package manager for Kubernetes

  11. Helm History • Came from internal Deis hackathon • Inspired

    by package managers like Homebrew, Apt, Yum • $ brew install <package> • $ helm install <package>
  12. • Packages of pre-configured Kubernetes resources • Recipe for installing

    an application in Kubernetes • Consist of • Metadata • Kubernetes resource manifests • Documentation • Can be templated with Go templating • Live in chart repositories Charts
  13. Public Charts • Available on github.com/Kubernetes/charts • Stable charts –

    no alpha features, tested • Incubator charts – may contain alpha features, community iteration • Examples of how to deploy common applications in Kubernetes • Great for getting started *Can also create your chart repositories for hosting private charts
  14. Grab Helm from Homebrew or Github Releases Page $ brew

    install kubernetes-helm
  15. Getting Started is Simple $ helm init

  16. Helm in Action Demo

  17. Navigating a Chart • Collection of files inside of a

    directory • Directory name is name of the chart
  18. Templates • Go templating • Sprig library for even more

    go template functions • Templating not required
  19. Configuration • Default configuration lives in values.yaml file inside chart

    • Can override values.yaml file • Can override configuration on command line using the –set flag
  20. Chart Repositories • Where your charts live • An HTTP

    server able to serve YAML and tar files • Houses index.yaml file • Houses some packaged charts (tar files) • Can use Google Cloud Storage (GCS) Buckets, Azure Storage Blobs, Amazon S3, Github pages, or create your own web server
  21. Helm Community • Over 200 contributors • Over 2.5k people

    in the Kubernetes Helm slack channel • Kubernetes Slack • #helm-users • #helm-dev • Grab an invite at slack.k8s.io • Weekly public developer calls on Thursdays • Standups on SIG-Apps calls • More info at github.com/kubernetes-helm/community
  22. Extending Helm with Plugins Because we're all snowflakes

  23. Future of Helm • Starting planning for Helm v3.0.0 •

    Feel free to submit issues • Will start discussion at the Helm Summit in January • Helm Summit • Mid-January • More info in slack channels • Anyone is welcome to attend • Helm mailing lists coming soon
  24. Developing Applications for Kubernetes Is still hard

  25. Rinse and Repeat 1. Hack on source code 2. Create

    Dockerfile 3. Build Docker image 4. Push Docker image to container registry 5. Create a Helm chart 6. Install the Helm chart
  26. https://giphy.com/gifs/tanisha-fy0gLJtIkZj8I/download

  27. Dependencies, Dependencies, Dependencies • Docker • Container Registry • Docker

    • Quay.io • GCR • ACR • Your own • Helm • Kubernetes environment • Running cluster or minikube
  28. A tool for building Kubernetes-native apps

  29. Getting Started • $ draft init • Sets up local

    env • Sets up server side component: draftd • Pre-requisites • Running Kubernetes cluster or minikube • Container registry *unless minikube
  30. Demo If the demo gods are up for it

  31. $ draft create 1. Detects application language 2. Creates appropriate

    Dockerfile 3. Creates a Helm chart for your application 4. Creates a draft.toml file to store draft metadata and config
  32. $ draft up 1. Bundles up directory and pushes to

    server 2. Builds Docker image 3. Pushes Docker image to container registry 4. Installs Helm chart in cluster using Docker image just created
  33. $ draft connect 1. Gives you localhost url to play

    with your app 2. Streams your application logs in your terminal
  34. Tell me where the magic happens

  35. Draft Packs • A way to bootstrap your application for

    Kubernetes • Includes a Dockerfile • Includes a Helm chart • Based off common best practices • Can customize • Includes a draft.toml file • For metadata and configuration purposes
  36. Building Your Own Draft Pack

  37. Pack Repositories • Way to store your own custom packs

    • Github repo • $ draft pack repo add <repo url> • Available in latest releast of draft 0.8.0!
  38. Tips & Tricks • Specify pack to use with --pack

    flag • Bring your own Dockerfile (BYOD) • Use helm package to get a deployable unit
  39. Recap • Helm • Kubernetes package manager • Tool for

    templating Kubernetes manifests • Charts • Packages of Kubernetes resources • Public charts at KubeApps.com & github.com/Kubernetes/charts • Draft • Tool for developing apps for Kubernetes • Removes container and Kubernetes knowledge overhead for developers
  40. Developer Tools for Kubernetes Tomorrow @ 10:55am in Karlin I

  41. Thank You! @technosophos, @michellenoorali