Pykube (pykube-ng) is a lightweight Python 3+ client library for Kubernetes.
To install pykube, use pip:
pip install pykube-ng
Query for all ready pods in a custom namespace:
import operator
import pykube
api = pykube.HTTPClient(pykube.KubeConfig.from_file())
pods = pykube.Pod.objects(api).filter(namespace="gondor-system")
ready_pods = filter(operator.attrgetter("ready"), pods)
There is not much documentation yet, but you can check out the README on github and browse the :ref:`pykube-package`.
.. toctree:: :maxdepth: 2 :glob: howtos/index.rst readme changelog users