skillfed

kfp-kubernetes

Kubernetes platform configuration library and generated protos.

kfp-kubernetes v2.17.0 265.7K downloads/30d#8,316 on PyPI4,184
Permissive license Apache 2.0 Active released

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-kubernetes

uv

uv add kfp-kubernetes

poetry

poetry add kfp-kubernetes

Installing 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

kubeflow pipelines kubernetes integrationkfp kubernetes secrets volumeskubeflow pipeline pod configurationkubernetes persistent volumes kfpkubeflow pipeline node selectorskfp kubernetes manifestskubeflow pipeline storage claims
kubeflowkubernetes-integrationml-pipelines

More Distributed Computing packages