April 2018
Intermediate to advanced
468 pages
14h 34m
English
Exploring the API interactively using httpie and jq is great, but the real power of API comes when you consume and integrate it with other software. The Kubernetes incubator project provides a full-fledged and very well-documented Python client library. It is available at https://github.com/kubernetes-incubator/client-python.
First, make sure you have Python installed (either 2.7 or 3.5+). Then install the Kubernetes package:
> pip install kubernetes
To start talking to a Kubernetes cluster, you need to connect to it. Start an interactive Python session:
> python Python 3.6.4 (default, Mar 1 2018, 18:36:42) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin Type "help", ...
Read now
Unlock full access