/escafil

A minimal Kubernetes API client in Python

Primary LanguagePythonApache License 2.0Apache-2.0

Escafil

Escafil is a minimal client for the Kubernetes API:

from escafil import Kubernetes, APIObject

kube = Kubernetes('http://localhost:8001')

class Pod(APIObject):
    pass

kube.list(Pod)
pod = kube.get(Pod, 'my-pod', namespace='default')
print(pod['spec']['containers'][0]['name'])

The API is not yet stable; use at your own risk.