Skip to main content

Zalando Kubectl

Description

PyPI Downloads

Latest PyPI version License

Kubernetes CLI (kubectl) wrapper in Python with OAuth token authentication.

This wrapper script zkubectl serves as a drop-in replacement for the kubectl binary:

  • it downloads the current kubectl binary from Google
  • it generates a new ~/.kube/config with an OAuth Bearer token acquired via zign.
  • it passes through commands to the kubectl binary

User Facing documentation

Contribute

Setup project

  • It's recommended to use uv for the project.

Go to the project dir and install dependencies with uv

$ cd <project-path>
$ uv sync
  • [Optional] install pre-commit hooks
$ pre-commit install
  • [Optional] The project uses ruff for code formatting, configure your editor to use it.

Unit Tests

Run unit tests with Docker:

docker build --build-arg PYTHON_VERSION=3.10 --build-arg PACKAGE_NAME=zalando_kubectl -f Dockerfile.test .
docker build --build-arg PYTHON_VERSION=3.11 --build-arg PACKAGE_NAME=zalando_kubectl -f Dockerfile.test .
docker build --build-arg PYTHON_VERSION=3.12 --build-arg PACKAGE_NAME=zalando_kubectl --build-arg DEBIAN_DISTRO=bullseye -f Dockerfile.test .
docker build --build-arg PYTHON_VERSION=3.13 --build-arg PACKAGE_NAME=zalando_kubectl --build-arg DEBIAN_DISTRO=bullseye -f Dockerfile.test .

Run Locally

via uv

$ uv run zkubectl

Or first activate the virtualenv

$ source .venv/bin/activate
$ zkubectl login playground

Use as kubectl plugin

The project exposes scripts that use the kubectl plugin format

You can see which ones are available in the scripts section of pyproject.toml

In order for kubectl to detect the subcommands provided by the script, they must be in the PATH, so you need first to activate the virtualenv

$ source .venv/bin/activate
$ kubectl login playground

Metadata

Release files for zalando-kubectl 1.36.3.437

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zalando-kubectl 1.36.3.437
File Size Uploaded Provenance Actions
zalando_kubectl-1.36.3.437.tar.gz 51.7 kB Without provenance Details for zalando_kubectl-1.36.3.437.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zalando-kubectl 1.36.3.437
File Interpreter ABI Platform Actions
zalando_kubectl-1.36.3.437-py3-none-any.whl Python 3 none any Details for zalando_kubectl-1.36.3.437-py3-none-any.whl

Total release size: 103.8 kB

Release files / zalando_kubectl-1.36.3.437.tar.gz

Download URL zalando_kubectl-1.36.3.437.tar.gz
Size 51.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bd1e8ccac312bf90684e5151b79cc72370be2af2cc79cbba78c929cef236cb53
BLAKE2b-256 checksum
How to use checksums
3b3c2f33402dab2db41f74421d1a24ded1b29546a037f3a46c0e13460e04852d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / zalando_kubectl-1.36.3.437-py3-none-any.whl

Download URL zalando_kubectl-1.36.3.437-py3-none-any.whl
Size 52.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77e6cec57f6d38bb0b8f5f238e30a40ca43fd907bfc8f3349855f224a65c226c
BLAKE2b-256 checksum
How to use checksums
98ee9916d398c9ca94b020439d24a033fcbbd0391a9d2073d7a50feeed7081ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for zalando-kubectl 1.36.3.437

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.36.3.437 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page