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

From source to Kubernetes in 30 minutes

From source to Kubernetes in 30 minutes

Bastian Hofmann

October 21, 2019
Tweet

More Decks by Bastian Hofmann

Other Decks in Programming

Transcript

  1. @BastianHofmann
    From source to Kubernetes
    In 30 Minutes
    Bastian Hofmann
    [email protected]

    View full-size slide

  2. Container orchestration platform

    View full-size slide

  3. Deploy, run and scale your services
    in isolated containers

    View full-size slide

  4. Your application is bundled in an
    image

    View full-size slide

  5. The image contains everything the
    application needs to run

    View full-size slide

  6. The image is started in an isolated
    container

    View full-size slide

  7. No vendor lock in

    View full-size slide

  8. Standardized APIs

    View full-size slide

  9. Cloud Providers

    View full-size slide

  10. And if you don't want to install and
    maintain Kubernetes yourself

    View full-size slide

  11. Managed Kubernetes

    View full-size slide

  12. So we have code, how do we get this
    into Kubernetes?

    View full-size slide

  13. Angular demo application

    View full-size slide

  14. Build a docker image

    View full-size slide

  15. Contains everything that the service
    needs to run

    View full-size slide

  16. Make the build as fast as possible

    View full-size slide

  17. Make the image as small as possible

    View full-size slide

  18. Tell Kubernetes to

    View full-size slide

  19. Start containers

    View full-size slide

  20. In Kubernetes

    View full-size slide

  21. • A group of 1 or more
    containers
    • Same port space
    • Within a Pod:
    communication over
    localhost
    • Every container has their
    own filesystem
    • Every Pod has it's own IP
    • All Pods can talk with each
    other
    • IPs change all the time
    Pod

    View full-size slide

  22. LoadBalancer

    View full-size slide

  23. Everything in Kubernetes is a
    resource (document) defined in
    YAML

    View full-size slide

  24. Also all those YAML files are not nice

    View full-size slide

  25. Also we need

    View full-size slide

  26. CI/CD pipeline

    View full-size slide

  27. Make use of Kubernetes "magic"

    View full-size slide

  28. LoadBalancers

    View full-size slide

  29. Automatically creates a highly
    available LoadBalancer with a
    public IP address

    View full-size slide

  30. Ingress controller

    View full-size slide

  31. The ingress controller (nginx) listens
    on routing rules in Ingress Resources
    and configures itself to route
    incoming traffic to the correct
    running and healthy pods

    View full-size slide

  32. cert-manager

    View full-size slide

  33. Cert-manager listens on Ingress
    Resources and if they need TLS,
    requests a certificate from
    LetsEncrypt

    View full-size slide

  34. external-dns

    View full-size slide

  35. External-DNS listens on Ingress
    Resources and creates DNS entries

    View full-size slide

  36. Sealed Secrets

    View full-size slide

  37. Secrets are stored encrypted in Git
    and decrypted inside of the cluster

    View full-size slide

  38. Kubernetes and Node metrics are
    automatically included

    View full-size slide

  39. Kubernetes and Node alerts are
    automatically included

    View full-size slide

  40. Kubernetes and Node dashboards
    are automatically included

    View full-size slide

  41. Scraping targets can be
    automatically discovered

    View full-size slide

  42. Service Meshes

    View full-size slide

  43. Recommendation: Start playing
    around with Kubernetes

    View full-size slide

  44. Alternatives

    View full-size slide

  45. Kubernetes-based platform to
    deploy and manage modern
    serverless workloads

    View full-size slide

  46. CI that runs completely within
    Kubernetes with Kubernetes Custom
    Resources

    View full-size slide

  47. https:/
    /gitlab.com/bashofmann/
    angular-test-app

    View full-size slide

  48. https:/
    /gitlab.com/bashofmann/
    angular-test-app-finished

    View full-size slide

  49. https:/
    /github.com/syseleven/
    golem-workshop

    View full-size slide

  50. [email protected]
    https:/
    /twitter.com/BastianHofmann
    http:/
    /speakerdeck.com/u/bastianhofmann

    View full-size slide