Steuermann an Bord - Kubernetes Hands-On

Steuermann an Bord - Kubernetes Hands-On

F029ec9c798e4dc447cab5e76f62fa17?s=128

Nicolas Byl

March 30, 2017
Tweet

Transcript

  1. 1 STEUERMANN AN BORD – KUBERNETES HANDS-ON JavaLand, 30.03.2016 Nicolas

    Byl, codecentric AG
  2. 2 . 1 EINFÜHRUNG

  3. 2 . 2 Nicolas Byl Senior IT Consultant https://github.com/nbyl https://twitter.com/NicolasByl

  4. 2 . 3 Agenda Wann? Was? 09:00 Einführung Docker Kubernetes

    10:15 Kaffeepause 10:45 Lab 1: kubectl 12:45 Mittagessen
  5. 2 . 4 Agenda (2) Wann? Was? 13:30 Helm Lab

    2: Helm Charts 14:30 Kaffeepause 15:00 Deis Workflow Lab 3: Deis Workflow Wrap-Up 16:30 Ende
  6. 2 . 5 Mission Statement Es gibt keine dummen Fragen!

    Hilfe zur Selbsthilfe
  7. None
  8. 2 . 6 3 . 1 DOCKER

  9. None
  10. 3 . 2

  11. 3 . 3

  12. 3 . 4

  13. 3 . 5

  14. 3 . 6 3 . 7 Dockerfile FROM java:8 MAINTAINER

    Marcel Birkner <marcel.birkner@codecentric.de> ADD target/edmp-sample-app*.jar app.jar RUN bash -c 'touch /app.jar' ENTRYPOINT ["java","-jar","/app.jar"]}
  15. None
  16. 3 . 8 4 . 1 KUBERNETES

  17. "Kubernetes is an open-source platform for automating deployment, scaling, and

    operations of application containers across clusters of hosts, providing container- centric infrastructure."
  18. 4 . 2 portable: public, private, hybrid, multi-cloud extensible: modular,

    pluggable, hookable, composable self-healing: auto-placement, auto-restart, auto- replication, auto-scaling
  19. 4 . 3

  20. 4 . 4 4 . 5 Pods & Co.

  21. 4 . 6 Pods

  22. 4 . 7 Replication Controller  P P P

  23. 4 . 8 Deployment Kombination aus Pod und Replication Controller

    Einheit
  24. apiVersion: extensions/v1beta1 kind: Deployment metadata: name: frontend spec: replicas: 3

    template: metadata: labels: app: guestbook tier: frontend spec: containers: - name: php-redis image: gcr.io/google-samples/gb-frontend:v4 resources: requests:
  25. 4 . 9 4 . 10 Services

  26. 4 . 11 Endpunkt für eine Menge von Pods einen

    externen Endpunkt Auflösung über DNS Umgebungsvariablen
  27. None
  28. 4 . 12 5 . 1 LAB 0: SETUP

  29. 5 . 2 Vorraussetzungen kubectl helm deis https://goo.gl/3YDCIe

  30. 5 . 3 Konfiguration Teams bilden Clustername: teamX.kubeland.cc Konfigurationsdatei nach

    $HOME/.kube/config kubectl cluster-info
  31. None
  32. 6 . 1 6 . 2 Business Model Real-Time Statistics

    as a Service
  33. 6 . 3 Unser Potentieller Investor

  34. 7 . 1 LAB 1: KUBECTL

  35. None
  36. 8 . 1 8 . 2 Lasst und die Kunden

    jagen
  37. 9 . 1 HELM

  38. 9 . 2 Paket Manager Installation von komplexen Applikationen Repositories

    mit Kubernetes Artefakten Reproduzierbare Releases inklusive Rollback
  39. 9 . 3 Architektur Server: tiller Client: helm CLI

  40. 9 . 4 Konzept Installationsbeschreibung durch YAML-Templates Eigene Versionierung der

    Paketierung Bei Installation/Upgrade Ersetzung durch Standard oder vorgegebene Werte History von Deployments
  41. 9 . 5 Beispiel helm init helm search redis [...]

    helm install stable/redis [...] helm install working-tiger stable/redis --set "image.version=3.2.8-r2" helm rollback working-tiger
  42. 10 . 1 LAB 2: HELM

  43. None
  44. 11 . 1 Wir brauchen mehr Entwicker

  45. 11 . 2

  46. 12 . 1 DEIS WORKFLOW

  47. 12 . 2 Twelve-Factor Applications

  48. 12 . 3 Codebase One codebase tracked in revision control,

    many deploys Dependencies Explicitly declare and isolate dependencies Config Store config in the environment Backing Services Treat backing services as attached resources Build, release, run Strictly separate build and run stages Processes Execute the app as one or more stateless processes
  49. 12 . 4 Port binding Export services via port binding

    Concurrency Scale out via the process model Disposability Maximize robustness with fast startup and graceful shutdown Dev/prod parity Keep development, staging, and production as similar as possible Logs Treat logs as event streams Admin processes Run admin/management tasks as one-off processes
  50. None
  51. 12 . 5 12 . 6 Architektur

  52. 12 . 7 Struktur einer Deis Applikation

  53. 12 . 8 Workflow

  54. 13 . 1 LAB 3: DEIS WORKFLOW

  55. 14 . 1 ENDE

  56. 14 . 2 Cluster aufbauen minikube kops Tectonic

  57. 14 . 3 Ausblick 1.6+ RBAC Federation Dynamic Storage Provisioning

  58. 14 . 4 Links https://kubernetes.io https://helm.sh https://deis.com https://www.cncf.io https://www.openshift.com/promotions/kubernetes.html https://github.com/ramitsurana/awesome-kubernetes

  59. 14 . 5 The End @NicolasByl Copyright 2017