Pykube

https://img.shields.io/pypi/v/pykube-ng.svg https://img.shields.io/pypi/pyversions/pykube-ng.svg https://img.shields.io/badge/license-apache-blue.svg

Pykube (pykube-ng) is a lightweight Python 3+ client library for Kubernetes.

Installation

To install pykube, use pip:

pip install pykube-ng

Usage

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)

Indices and tables