Slide 1

Slide 1 text

Exploring the Kubernetes Clients ecosystem Nabarun Pal

Slide 2

Slide 2 text

$ 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

Slide 3

Slide 3 text

Overview of the Kubernetes Architecture

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

Speaking with the Kubernetes API

Slide 6

Slide 6 text

kubectl

Slide 7

Slide 7 text

client-go

Slide 8

Slide 8 text

Clients out of the Kubernetes source tree

Slide 9

Slide 9 text

But, why not cURL?

Slide 10

Slide 10 text

Architecture of the clients

Slide 11

Slide 11 text

OpenAPI Spec

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

Structure of the Python Client

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

Client Capabilities

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

Demo Time!

Slide 19

Slide 19 text

How can you help?

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

Thank You!!! @theonlynabarun nabarun.dev

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

No content