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 full-size 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 full-size slide

  3. Overview of the Kubernetes Architecture

    View full-size slide

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

    View full-size slide

  5. Speaking with the Kubernetes API

    View full-size slide

  6. Clients out of the Kubernetes source tree

    View full-size slide

  7. But, why not cURL?

    View full-size slide

  8. Architecture of the clients

    View full-size slide

  9. OpenAPI Spec

    View full-size slide

  10. 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 full-size slide

  11. Structure of the Python Client

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  14. Client Capabilities

    View full-size slide

  15. 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 full-size slide

  16. How can you help?

    View full-size slide

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

    View full-size slide

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

    View full-size slide