Skip to main content

Library to generate Kubernetes manifests using Python code

Project description

kubekind

Library to generate Kubernetes manifests using Python code

PyPi Code style: black

Motivation

Write manifests using Python code to improve readability and getting the benefits of IDEs IntelliSense features.

Requirements

  • Python 3.9+ on Linux, Windows or Mac

Install

pip insall kubekind

Generated a pod manifest

# test.py
from kubekind import Pod, Container

with Pod("my-pod") as pod:
    Container("bash", "bash:latest", args=["sleep", "10000"]).add()
    Container("bash_2", "bash:latest", args=["sleep", "10000"]).add()

pod.print()

Apply the manifest

python test.py | kubectl apply -f -

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kubekind-0.0.1.tar.gz (33.3 kB view hashes)

Uploaded Source

Built Distribution

kubekind-0.0.1-py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page