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

Exploring the Kubernetes Clients ecosystem

Nabarun Pal
September 11, 2021

Exploring the Kubernetes Clients ecosystem

Open Infra Days Asia 2021

Nabarun Pal

September 11, 2021
Tweet

More Decks by Nabarun Pal

Other Decks in Technology

Transcript

  1. Exploring the
    Kubernetes Clients
    ecosystem
    Nabarun Pal

    View Slide

  2. $ whoami
    ● Software Engineer at VMware
    ● Release Lead for Kubernetes 1.21
    ● Kubernetes Code of Conduct Committee Member
    ● PyCon India Technical Working Group Lead
    ● CNCF GSoC Administrator

    View Slide

  3. Overview of the Kubernetes Architecture

    View Slide

  4. Source: https://docs.google.com/presentation/d/1zrfVlE5r61ZNQrmXKx5gJmBcXnoa_WerHEnTxu5SMco/edit?usp=sharing under CC BY 4.0

    View Slide

  5. Speaking with the Kubernetes API

    View Slide

  6. kubectl

    View Slide

  7. client-go

    View Slide

  8. Clients out of the Kubernetes source tree

    View Slide

  9. But, why not cURL?

    View Slide

  10. Architecture of the clients

    View Slide

  11. OpenAPI Spec

    View Slide

  12. Generator Scripts
    kubernetes-client/gen
    1. Pulls the OpenAPI Spec for the targeted Kubernetes version
    2. Runs OpenAPI Generator on the OpenAPI Spec
    3. Performs post processing tasks like cleaning up unnecessary docs etc.
    4. Patches generated code with any one-off changes

    View Slide

  13. Structure of the Python Client

    View Slide

  14. Two Repo system
    kubernetes-client/python-base
    Contains helpers for parsing config files, watching objects, leader election etc.

    View Slide

  15. Two Repo system
    kubernetes-client/python
    Operational code for manipulating objects in Kubernetes Control Plane

    View Slide

  16. Client Capabilities

    View Slide

  17. Bronze
    ● Support loading config from kube config file
    ○ Basic Auth (username/password)
    ○ X509 Client certificate (inline and referenced by file)
    ○ Bearer tokens (inline and referenced by file)
    ○ encryption/TLS (inline, referenced by file, insecure)
    ● Basic API calls such as list pods should work
    ● Works from within the cluster environment
    Silver
    ● Support watch calls
    Gold
    ● Support exec, attach, port-forward calls
    ● Proto encoding
    Ref: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/csi-new-client-library-procedure.md#client-capabilities

    View Slide

  18. Demo Time!

    View Slide

  19. How can you help?

    View Slide

  20. ● Implement new features in the Python client
    ● Help with the releases
    ● Help the Python client achieve Gold Standard

    View Slide

  21. Thank You!!!
    @theonlynabarun
    nabarun.dev

    View Slide

  22. View Slide

  23. View Slide

  24. View Slide

  25. View Slide

  26. View Slide

  27. View Slide

  28. View Slide

  29. View Slide

  30. View Slide

  31. View Slide

  32. View Slide