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

Release files for zalando-kubectl 1.36.3.429

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.429
File Size Uploaded
zalando_kubectl-1.36.3.429.tar.gz 51.5 kB Details

Built distribution (wheel)

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

Total release size: 103.7 kB

Release files / zalando_kubectl-1.36.3.429.tar.gz

Download URL zalando_kubectl-1.36.3.429.tar.gz
Size 51.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1ab6e7ddd6685421adf5b19e2d3eeff7aa61e72c6d5e4d5f5254c3c7ff6e87fc
BLAKE2b-256 checksum
How to use checksums
75816d14b7ee06fc250235410f5ce6df84317fa96021f97d1100fd02bc95db7d
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.429-py3-none-any.whl

Download URL zalando_kubectl-1.36.3.429-py3-none-any.whl
Size 52.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a3420e0560a632ff99bc600c6f2b1599db9dcf89299305e7378628d67b888449
BLAKE2b-256 checksum
How to use checksums
ba6862235ad278c3376a0549de51aa8c4c1372cb8dca78c8a2f12ef32c09d749
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 history Release notifications | RSS feed

This release

1.36.3.429 This release

2 release files

1.8.5

2 release files

1.7.13

2 release files

1.7.12

2 release files

1.7.6

2 release files

1.7.3

2 release files

1.6.0

2 release files

0.24

2 release files

0.23

2 release files

0.22

2 release files

0.21

2 release files

0.20

2 release files

0.19

2 release files

0.18

2 release files

0.17

2 release files

0.16

2 release files

0.15

2 release files

0.14

2 release files

0.13

2 release files

0.12

2 release files

0.11

2 release files

0.10

2 release files

0.9

2 release files

0.8

2 release files

0.7

2 release files

0.6

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

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