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

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
Tweet

More Decks by Michelle Noorali

Other Decks in Technology

Transcript

  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. 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)
  6. 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
  7. We needed a tool to manage a group of related

    resources in Kubernetes as one unit
  8. Helm History • Came from internal Deis hackathon • Inspired

    by package managers like Homebrew, Apt, Yum • $ brew install <package> • $ helm install <package>
  9. • 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
  10. 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
  11. Navigating a Chart • Collection of files inside of a

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

    go template functions • Templating not required
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. Dependencies, Dependencies, Dependencies • Docker • Container Registry • Docker

    • Quay.io • GCR • ACR • Your own • Helm • Kubernetes environment • Running cluster or minikube
  19. 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
  20. $ 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
  21. $ 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
  22. $ draft connect 1. Gives you localhost url to play

    with your app 2. Streams your application logs in your terminal
  23. 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
  24. 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!
  25. Tips & Tricks • Specify pack to use with --pack

    flag • Bring your own Dockerfile (BYOD) • Use helm package to get a deployable unit
  26. 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