$30 off During Our Annual Pro Sale. View Details »

Knative: k8s for Developers

Knative: k8s for Developers

Knative foi muito associado a serverless, o que é apenas uma das features propostas pelo knative.
Acredito que outras funcionalidades com abstração de deployments de serviços propõe muito mais valor para o desenvolvedor que enfrenta a complexidade dos tipos do kubernetes. Atualmente java está mais "pronto" para rodar serviços que tem baixo tempo de bootstrap e quem sabe até umas funções serverless.

Claudio Eduardo de Oliveira

October 17, 2020
Tweet

More Decks by Claudio Eduardo de Oliveira

Other Decks in Technology

Transcript

  1. Knative: k8s for
    developers
    Knative: k8s for developers

    View Slide

  2. Claudio E. de Oliveira
    Sr. Software Engineer
    @ZUP Innovation
    Java & Golang
    K8s, Docker & Mesh

    View Slide

  3. 1 - What is K8s
    4 - Demos
    3 - Knative
    2 - k8s in developer perspective
    Agenda
    Agenda

    View Slide

  4. What is
    kubernetes??

    View Slide

  5. Kubernetes is a portable, extensible,
    open-source platform for managing
    containerized workloads and services, that
    facilitates both declarative configuration and
    automation
    https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/

    View Slide

  6. and what is
    kubernetes in
    developers
    perspective??

    View Slide

  7. Containers
    PODs
    ReplicaSets
    Deployments
    Endpoints
    Services
    Secrets
    ConfigMaps
    Volumes / PV / PVC
    Ingress / LBs
    Networks
    K8s Primitives K8s Tools
    yamls Istio
    helm
    kubectl
    Spec and
    Status

    View Slide

  8. View Slide

  9. View Slide

  10. but...wait….it is not made for developers...is
    pretty much infrastructure for them…
    that is the turning point

    View Slide

  11. View Slide

  12. https://tanzu.vmware.com/content/blog/kubernetes-is-a-platform-for-building-platforms
    “So adopt Kubernetes. Get it running. And recognize that it’s a platform
    for running other platforms that will improve your software delivery and
    business outcomes.”
    - Richard Seroter is the VP of Product Marketing at Pivotal

    View Slide

  13. Some examples

    View Slide

  14. Introducing
    Knative
    Introducing Knative

    View Slide

  15. What is Knative???
    The purpose of Knative is to provide a simple,
    consistent layer over Kubernetes that solves
    common problems of deploying software.
    Remember:
    Kubernetes is a
    platform for building
    platforms

    View Slide

  16. Built for developers!!!!
    This layer creates a firmer boundary between the
    developer and the platform, allowing the developer
    to concentrate of the software they are directly
    responsible for.

    View Slide

  17. Built as a k8s extensions
    There is no restrictions regarding k8s
    If you need you can use full k8s resources
    it integrates with non-knative resources

    View Slide

  18. View Slide

  19. View Slide

  20. Platform teams or Platform Owners
    - Platform teams build, deploy, monitor, and are on
    call for the platform components and underlying
    platform infrastructure.
    https://martinfowler.com/articles/talk-about-platforms.html
    https://thenewstack.io/linkerd-2-0-the-service-mesh-for-service-owners-platform-architects-sres/

    View Slide

  21. we will focus on knative Serving

    View Slide

  22. How it works???
    Knative is a collection of processes, a.k.a containers,
    that run in k8s cluster. Knative uses CRDs, or
    kubernetes extensions and enables developers to use
    yamls like vanilla kubernetes.

    View Slide

  23. View Slide

  24. knative uses extensively kubernetes objects
    & concepts to achieve their goal

    View Slide

  25. Some words about
    infrastructure...few words…
    I Promise!!!!

    View Slide

  26. View Slide

  27. View Slide

  28. but for developers there are only four main
    concepts to understand...

    View Slide

  29. View Slide

  30. let's understand a
    little bit

    View Slide

  31. View Slide

  32. Configuration
    Configuration is a definition of our software, the list of
    containers and environments variables required to
    application run

    View Slide

  33. View Slide

  34. View Slide

  35. Revisions
    Snapshot of an app considering configuration, every
    time that configuration changes a new revision will be
    provisioned. In favor of immutable infrastructure

    View Slide

  36. View Slide

  37. View Slide

  38. Routes
    Is the way that Knative uses to map incoming requests
    to a specific revision.
    Get traffic for our applications

    View Slide

  39. Routes
    Questions that Routes wants to answer….
    At what public address or URL will traffic arrive from ?
    What targets can I send traffic to ?
    What percentage of traffic goes to which targets?

    View Slide

  40. View Slide

  41. View Slide

  42. Service
    Manage the application's lifecycle
    Our application abstraction

    View Slide

  43. let's see some knative use cases

    View Slide

  44. Abstract infra for
    developer
    Infra for Developer
    Demo #1

    View Slide

  45. Problem : k8s is a quite complex for
    developers deployments, services,
    configmaps…..
    Solution: Simple element Service

    View Slide

  46. Releasing
    Software
    Releasing software
    Demo #2

    View Slide

  47. Problem : release a new version of our
    software
    Solution: Release a new version using Canary
    Release

    View Slide

  48. Problem : release a new version of our
    software
    Solution: Release a new version using Canary
    Release

    View Slide

  49. Plus: Rollback immediately

    View Slide

  50. Increasing Demand
    Auto-Scaling Rules
    Increase demand - Auto-Scaling Rules
    Demo #3

    View Slide

  51. Problem : demand increasing our services
    should attend effectively
    Solution: Using KPA to provide elastic
    infrastructure

    View Slide

  52. Plus: Scale to zero feature

    View Slide

  53. Tips
    Tips

    View Slide

  54. Bootstrap time matter (if you are
    using scale to zero)

    View Slide

  55. Spring

    View Slide

  56. Micronaut

    View Slide

  57. Quarkus (native image)

    View Slide

  58. Conclusions
    Conclusions

    View Slide

  59. Knative is not only serverless. It is a
    complete platform to help
    developers in software delivery topic

    View Slide

  60. Take a look on Knative Eventing it
    can be very helpful to work with
    Event Driven Architecture

    View Slide

  61. github
    https://github.com/claudioed/cloud-conference-day-ops
    docker images are available at docker hub

    View Slide

  62. Serverless
    Quarkus
    Serverless

    View Slide

  63. https://developers.redhat.com/books/knative-cookbook https://www.manning.com/books/knative-in-action

    View Slide

  64. Obrigad_!

    View Slide