Slide 1

Slide 1 text

Highway to Helm Developing and Managing Applications in Kubernetes by Michelle Noorali and Matt Butcher @michellenoorali, @technosophos

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

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.

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

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

Slide 6

Slide 6 text

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)

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

Helm A package manager for Kubernetes

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

• 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

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

Getting Started is Simple $ helm init

Slide 16

Slide 16 text

Helm in Action Demo

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

Extending Helm with Plugins Because we're all snowflakes

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

Developing Applications for Kubernetes Is still hard

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

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

Slide 27

Slide 27 text

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

Slide 28

Slide 28 text

A tool for building Kubernetes-native apps

Slide 29

Slide 29 text

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

Slide 30

Slide 30 text

Demo If the demo gods are up for it

Slide 31

Slide 31 text

$ 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

Slide 32

Slide 32 text

$ 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

Slide 33

Slide 33 text

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

Slide 34

Slide 34 text

Tell me where the magic happens

Slide 35

Slide 35 text

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

Slide 36

Slide 36 text

Building Your Own Draft Pack

Slide 37

Slide 37 text

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

Slide 38

Slide 38 text

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

Slide 39

Slide 39 text

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

Slide 40

Slide 40 text

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

Slide 41

Slide 41 text

Thank You! @technosophos, @michellenoorali