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

    View Slide

  2. Michelle Noorali
    Microsoft. Helm and Draft. Kubernetes SIG-
    Apps. Kubernetes Steering Committee. Go
    and Ruby. Making distributed systems
    digestable.

    View Slide

  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.

    View Slide

  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

    View Slide

  5. Deis
    • Container PaaS on Kubernetes
    • Developer self-service
    • Heroku for your Kubernetes cluster

    View Slide

  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)

    View Slide

  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

    View Slide

  8. How do you manage a
    set of related
    resources in
    Kubernetes?

    View Slide

  9. We needed a tool to
    manage a group of
    related resources in
    Kubernetes as one unit

    View Slide

  10. Helm
    A package manager for
    Kubernetes

    View Slide

  11. Helm History
    • Came from internal Deis
    hackathon
    • Inspired by package
    managers like
    Homebrew, Apt, Yum
    • $ brew install
    • $ helm install

    View Slide

  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

    View Slide

  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

    View Slide

  14. Grab Helm from Homebrew or
    Github Releases Page
    $ brew install kubernetes-helm

    View Slide

  15. Getting Started is Simple
    $ helm init

    View Slide

  16. Helm in Action
    Demo

    View Slide

  17. Navigating a Chart
    • Collection of files inside of a directory
    • Directory name is name of the chart

    View Slide

  18. Templates
    • Go templating
    • Sprig library for even more go
    template functions
    • Templating not required

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  22. Extending Helm with Plugins
    Because we're all snowflakes

    View Slide

  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

    View Slide

  24. Developing Applications for
    Kubernetes
    Is still hard

    View Slide

  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

    View Slide

  26. https://giphy.com/gifs/tanisha-fy0gLJtIkZj8I/download

    View Slide

  27. Dependencies, Dependencies, Dependencies
    • Docker
    • Container Registry
    • Docker
    • Quay.io
    • GCR
    • ACR
    • Your own
    • Helm
    • Kubernetes environment
    • Running cluster or minikube

    View Slide

  28. A tool for building Kubernetes-native apps

    View Slide

  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

    View Slide

  30. Demo
    If the demo gods are up for it

    View Slide

  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

    View Slide

  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

    View Slide

  33. $ draft connect
    1. Gives you localhost url to play with your app
    2. Streams your application logs in your terminal

    View Slide

  34. Tell me where the magic happens

    View Slide

  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

    View Slide

  36. Building Your Own Draft Pack

    View Slide

  37. Pack Repositories
    • Way to store your own custom packs
    • Github repo
    • $ draft pack repo add
    • Available in latest releast of draft 0.8.0!

    View Slide

  38. Tips & Tricks
    • Specify pack to use with --pack flag
    • Bring your own Dockerfile (BYOD)
    • Use helm package to get a deployable unit

    View Slide

  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

    View Slide

  40. Developer Tools for Kubernetes
    Tomorrow @ 10:55am in Karlin I

    View Slide

  41. Thank You!
    @technosophos, @michellenoorali

    View Slide