kfp-kubernetes
Kubernetes platform configuration library and generated protos.
What it is and what it does
kfp-kubernetes is an addon library to Kubeflow Pipelines SDK that brings native Kubernetes concepts into pipeline authoring. Instead of writing generic pipeline code, you can directly configure Kubernetes-level details like Secrets, PersistentVolumeClaims, node selectors, tolerations, image pull policies, and pod metadata directly on pipeline tasks. This bridges the gap between high-level pipeline logic and low-level Kubernetes pod configuration.
The library works by providing a set of functions that modify task definitions to inject Kubernetes-specific configuration. You define your pipeline components normally using the kfp SDK, then call functions like `use_secret_as_env`, `mount_pvc`, `add_pod_label`, or `set_timeout` to layer on Kubernetes behavior. This approach keeps pipeline logic separate from infrastructure concerns while giving you full control over how tasks run on the cluster.
Use it for:
- Mount Kubernetes Secrets as environment variables or volumes in pipeline task containers for credential and configuration management.
- Attach PersistentVolumeClaims to tasks for shared data storage across pipeline stages or ephemeral volumes for temporary task-local storage.
- Configure pod scheduling constraints using node selectors and tolerations to run tasks on specific cluster nodes or hardware.
- Set pod metadata like labels and annotations for observability, cost tracking, or integration with external monitoring systems.
- Control container image pull behavior and set task timeouts using Kubernetes pod spec fields directly from pipeline code.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Extends Kubeflow Pipelines SDK with Kubernetes-native features like Secrets, PersistentVolumeClaims, node selectors, tolerations, and pod metadata configuration for pipeline tasks.
Yes, if you are authoring Kubeflow Pipelines and need to configure Kubernetes-specific features like storage, secrets, or scheduling. The package is actively maintained, has low install friction, carries a permissive license, and integrates cleanly with the kfp SDK. Install it only if you are already using Kubeflow Pipelines; it is not useful standalone.
Install
kfp-kubernetes on PyPI
pip
pip install kfp-kubernetesuv
uv add kfp-kubernetespoetry
poetry add kfp-kubernetesInstalling kfp-kubernetes
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with recent releases; last commit 2026-08-14 and latest release 2026-07-09. Requires Python >=3.9.0.
License in practice
Apache 2.0 permissive license allows commercial and private use with minimal restrictions, typical for open-source infrastructure tools.
Quickstart
pip install kfp-kubernetes
from kfp import dsl
from kfp import kubernetes
@dsl.component
def my_task():
print('hello')
@dsl.pipeline
def my_pipeline():
task = my_task()
kubernetes.use_secret_as_env(task, secret_name='my-secret', secret_key_to_env={'password': 'SECRET_VAR'})
Requires an active Kubeflow Pipelines installation and a Kubernetes cluster to run pipelines; Python >=3.9.0 required.
Verify before relying
- Whether this package works standalone or requires a specific version of kfp to be installed first.
- Compatibility with different Kubernetes versions or Kubeflow Pipelines versions beyond the runtime dependency on kfp.
- Performance characteristics when managing large numbers of volumes or secrets across pipeline tasks.
Package facts
| License | Apache 2.0 (permissive) |
| Python support | supports the current Python release (>=3.9.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — protobuf, kfp, requests, urllib3 |
| Maintenance | actively maintained — 36 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 265,733/month — #8,316 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: kfp_kubernetes-2.17.0-py3-none-any.whl
Tags
More Distributed Computing packages
gRPC Python is an HTTP/2-based RPC framework…
permissive · top 100 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
cloudpickleCloudpickle extends Python's standard pickle…
permissive · top 1,000 on PyPI
smart-openProvides a unified, open()-compatible Python…
permissive · top 1,000 on PyPI
portalockerPortalocker provides cross-platform file…
permissive · top 1,000 on PyPI
rayRay is a distributed computing framework that…
permissive · top 1,000 on PyPI
kfpKubeflow Pipelines is a Python SDK for…
permissive · top 5,000 on PyPI
kfp-pipeline-specProvides the pipeline specification and…
permissive · top 5,000 on PyPI
kfp-server-apiProvides Python client bindings for the…
permissive · top 5,000 on PyPI
google-cloud-pipeline-componentsProvides predefined Kubeflow Pipelines…
permissive · top 5,000 on PyPI
kubeflowKubeflow SDK provides Python APIs to submit and…
permissive · top 15,000 on PyPI
kr8sA Python client library for Kubernetes that…
permissive · top 5,000 on PyPI
kubernetesProvides a Python interface to the Kubernetes…
permissive · top 1,000 on PyPI
pykube-ngpykube-ng is a Python client library for…
permissive · top 15,000 on PyPI
kubernetes-typedA mypy plugin that adds type checking support…
permissive · top 15,000 on PyPI
portforwardProvides Python bindings for Kubernetes…
permissive · top 15,000 on PyPI