Lightweight Python 3+ client library for Kubernetes (pykube-ng) https://pykube.readthedocs.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Henning Jacobs 0755dc1ce6
#9 add PodDisruptionBudget (#11)
2 years ago
pykube #9 add PodDisruptionBudget (#11) 2 years ago
tests #9 add PodDisruptionBudget (#11) 2 years ago
.gitignore skip tests, clean up build 2 years ago
.travis.yml fix twine package check 2 years ago
CHANGELOG.md Updated CHANGELOG round two 4 years ago
LICENSE initial port of code 6 years ago
Makefile update README 2 years ago
Pipfile test API calls 2 years ago
Pipfile.lock test API calls 2 years ago
README.rst update README 2 years ago
setup.cfg Added Travis CI 5 years ago
setup.py remove Python 2 compatibility (six) 2 years ago
tox.ini update README 2 years ago

README.rst

pykube-ng

image

Code Coverage

image

image

image

Python client library for Kubernetes.

This is a fork of kelproject/pykube which is no longer maintained (archived). Here the original text of the pykube README:

Kel is an open source Platform as a Service (PaaS) from Eldarion, Inc. that makes it easy to manage web application deployment and hosting through the entire lifecycle from development through testing to production. It adds components and tools on top of Kubernetes that help developers manage their application infrastructure. Kel builds on Eldarion's 7+ years experience running one of the leading Python and Django PaaSes. For more information about Kel, see kelproject.com or follow us on Twitter @projectkel.

Features

  • HTTP interface using requests using kubeconfig for authentication
  • Python native querying of Kubernetes API objects

Installation

To install pykube, use pip:

pip install pykube-ng

Usage

Query for all ready pods in a custom namespace:

Access any attribute of the Kubernetes object:

Selector query:

Watch query:

Create a Deployment:

Delete a Deployment:

Check server version:

Requirements

  • Python 3.6+
  • requests (included in install_requires)
  • PyYAML (included in install_requires)

Local Development

You can run pykube against your current kubeconfig context, e.g. local Minikube:

To run PEP8 (flake8) checks and unit tests including coverage report:

License

The code in this project is licensed under the Apache License, version 2.0 (included in this repository under LICENSE).

Contributing

Easiest way to contribute is to provide feedback! We would love to hear what you like and what you think is missing. Create an issue or ping try_except_ on Twitter.

PRs are welcome. Please also have a look at issues labeled with "help wanted".

Code of Conduct

In order to foster a kind, inclusive, and harassment-free community, this project follows the Contributor Covenant Code of Conduct.