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

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


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

  2. Claudio E. de Oliveira Sr. Software Engineer @ZUP Innovation Java

    & Golang K8s, Docker & Mesh
  3. 1 - What is K8s 4 - Demos 3 -

    Knative 2 - k8s in developer perspective Agenda Agenda
  4. What is kubernetes??

  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/
  6. and what is kubernetes in developers perspective??

  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
  8. None
  9. None
  10. but...wait….it is not made for developers...is pretty much infrastructure for

    them… that is the turning point
  11. None
  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
  13. Some examples

  14. Introducing Knative Introducing Knative

  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
  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.
  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
  18. None
  19. None
  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/
  21. we will focus on knative Serving

  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.
  23. None
  24. knative uses extensively kubernetes objects & concepts to achieve their

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

  26. None
  27. None
  28. but for developers there are only four main concepts to

  29. None
  30. let's understand a little bit

  31. None
  32. Configuration Configuration is a definition of our software, the list

    of containers and environments variables required to application run
  33. None
  34. None
  35. Revisions Snapshot of an app considering configuration, every time that

    configuration changes a new revision will be provisioned. In favor of immutable infrastructure
  36. None
  37. None
  38. Routes Is the way that Knative uses to map incoming

    requests to a specific revision. Get traffic for our applications
  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?
  40. None
  41. None
  42. Service Manage the application's lifecycle Our application abstraction

  43. let's see some knative use cases

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

  45. Problem : k8s is a quite complex for developers deployments,

    services, configmaps….. Solution: Simple element Service
  46. Releasing Software Releasing software Demo #2

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

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

    Release a new version using Canary Release
  49. Plus: Rollback immediately

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

  51. Problem : demand increasing our services should attend effectively Solution:

    Using KPA to provide elastic infrastructure
  52. Plus: Scale to zero feature

  53. Tips Tips

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

  55. Spring

  56. Micronaut

  57. Quarkus (native image)

  58. Conclusions Conclusions

  59. Knative is not only serverless. It is a complete platform

    to help developers in software delivery topic
  60. Take a look on Knative Eventing it can be very

    helpful to work with Event Driven Architecture
  61. github https://github.com/claudioed/cloud-conference-day-ops docker images are available at docker hub

  62. Serverless Quarkus Serverless

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

  64. Obrigad_!