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

Delivering Kubernetes Applications with Helm

Delivering Kubernetes Applications with Helm

Delivered by Matt Butcher, Adnan Abdulhussein, and Michelle Noorali at KubeCon 2016 in Seattle on Nov. 8th, 2016

Michelle Noorali

November 08, 2016
Tweet

More Decks by Michelle Noorali

Other Decks in Technology

Transcript

  1. Delivering Kubernetes Apps with Helm Matt Butcher @technosophos Michelle Noorali

    @michellenoorali Adnan Abdulhussein @prydonius
  2. https://flic.kr/p/74GbQz Kubernetes’ tools let you build your furniture from scratch.

  3. Most of us don’t want to build our furniture from

    scratch
  4. None
  5. We need a tool to manage a group of resources

    as one unit.
  6. None
  7. The Package Manager for Kubernetes Packages == Charts

  8. Charts • Are application definitions • Consist of... ◦ Metadata

    ◦ Kubernetes resource definitions ◦ Documentation • Live in chart repositories
  9. Grab Helm from Github or Homebrew $ brew cask install

    helm
  10. Getting Started is Simple $ helm init

  11. Helm & Tiller Like peanut butter & jelly

  12. Tiller • in-cluster component • Lives his life inside k8s

    as a pod • helps manage releases in your cluster ◦ Release = installation of a Kubernetes Chart Kubernetes Tiller Helm Client gRPC
  13. Init in Action https://goo.gl/PyW0wO

  14. Install Charts https://goo.gl/fWw8Lm

  15. Upgrade a Release https://goo.gl/lChu5T

  16. None
  17. Delete a Release https://goo.gl/vGUkYz

  18. Your First Chart $ helm create myapp

  19. myapp ├── Chart.yaml ├── README.md ├── charts ├── templates └──

    values.yaml Navigating a Chart
  20. myapp ├── Chart.yaml ├── README.md ├── charts ├── templates │

    ├── deployment.yaml │ └── svc.yaml └── values.yaml Templates + Go templating
  21. myapp ├── Chart.yaml ├── README.md ├── charts ├── templates └──

    values.yaml image: mycompany/myapp:1.0.0 imagePullPolicy: IfNotPresent service: port: 80 Configuration apiVersion: extensions/v1beta1 kind: Deployment spec: template: spec: containers: - name: {{ .Chart.Name }} image: "{{ .Values.image }}" imagePullPolicy: {{ .Values.imagePullPolicy }} ports: - containerPort: {{ .Values.service.port }} templates/deployment.yaml values.yaml
  22. myapp ├── Chart.yaml ├── README.md ├── charts ├── templates └──

    values.yaml Configuration $ helm install --set service.port=8080 \ ./myapp $ helm install -f myvalues.yaml ./myapp image: mycompany/myapp:1.0.0 imagePullPolicy: IfNotPresent service: port: 80 values.yaml
  23. myapp ├── Chart.yaml ├── README.md ├── charts │ └── mariadb-0.5.2.tgz

    ├── requirements.yaml ├── templates └── values.yaml dependencies: - name: mariadb version: 0.5.2 repository: http://storage.googleapis.com/kubernetes-charts Dependencies $ helm dependencies update requirements.yaml
  24. myapp ├── Chart.yaml ├── README.md ├── charts ├── templates │

    └── NOTES.txt └── values.yaml Chart Docs
  25. myapp ├── Chart.yaml ├── README.md ├── charts ├── templates └──

    values.yaml Chart Metadata name: mariadb version: 0.5.2 description: Chart for MariaDB keywords: - mariadb - mysql - database - sql home: https://mariadb.org sources: - https://github.com/bitnami/bitnami-docker-mariadb maintainers: - name: Bitnami email: [email protected] engine: gotpl
  26. • $ helm repo add mycompany charts.mycompany.com • $ helm

    install mycompany/myapp Chart Repositories
  27. github.com/helm/monocular

  28. github.com/kubernetes/charts

  29. Curated, ready-to-run applications

  30. Chart Best Practices

  31. It Works Out of the Box

  32. Split Out Dependencies

  33. Don't Repeat Yourself

  34. It's Reproducible

  35. It's Configurable

  36. 5 Ways Helm Helps Teams

  37. Get started quickly with existing charts

  38. Build your own charts, and easily share them

  39. Manage application lifecycle over time

  40. Fit releases to your existing tools and process (not vice

    versa)
  41. Let the cluster be the collaborative center for your releases

  42. Helm Community • Over 65 contributors • 1 year old

    • Slack channel: Kubernetes/#Helm • Public dev meetings: Thursdays @ 9:30 pacific • Weekly updates & demos at SIG-Apps meetings: Mondays @ 9am pacific Join us!
  43. What’s Next? • Helm 2.0.0 within 7 days • Helm

    2.x ◦ Stability, security ◦ Support for in-cluster testing ◦ Improve the debugging output • Monocular: The Helm Repository UI • Charts: ◦ Continue to grow the stable chart repository ◦ Incubator for testing pre-Beta Kubernetes features ◦ The Best Practices Guide
  44. Thank You!