Skip to main content

Kubernetes-backed WorkspaceProvider implementation and Kubernetes authorization plugin for MLflow workspaces.

Project description

MLflow Kubernetes Plugins

This repository packages two MLflow extensions for Kubernetes-backed deployments:

  • a workspace provider that maps MLflow workspaces to Kubernetes namespaces
  • an optional authorization plugin that enforces Kubernetes RBAC for MLflow requests

These plugins build on top of MLflow's 3.10 workspace support. If you are new to MLflow workspaces, start with the official guide: https://mlflow.org/docs/latest/self-hosting/workspaces/getting-started/. It covers the core MLflow server requirements, how workspace context is set by clients, and the upstream workspace lifecycle model.

Components

Entry point MLflow hook Purpose
kubernetes mlflow.workspace_provider Exposes Kubernetes namespaces as MLflow workspaces.
kubernetes-auth mlflow.app Wraps the MLflow server with Kubernetes-based authorization checks.

Install

Install from PyPI:

pip install mlflow-kubernetes-plugins

For local development:

pip install -e ".[dev]"

Quick Start

  1. Enable MLflow workspaces on an MLflow server backed by a SQL store.
  2. Install this package into the same environment as the MLflow server.
  3. Configure the workspace provider and, if needed, the auth plugin.
export MLFLOW_K8S_WORKSPACE_LABEL_SELECTOR="mlflow-enabled=true"
export MLFLOW_K8S_DEFAULT_WORKSPACE="team-a"

mlflow server \
  --backend-store-uri postgresql://user:pass@localhost/mlflow \
  --default-artifact-root s3://mlflow-artifacts \
  --enable-workspaces \
  --workspace-store-uri "kubernetes://" \
  --app-name kubernetes-auth

Use --app-name kubernetes-auth only when you want request authorization enforced by Kubernetes RBAC.

Documentation

Development

Run the main local checks from the repository root:

pip install -e ".[dev]"
make generate-k8s
ruff check .
pytest
python -m build

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

mlflow_kubernetes_plugins-1.2.0.tar.gz (89.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mlflow_kubernetes_plugins-1.2.0-py3-none-any.whl (65.7 kB view details)

Uploaded Python 3

File details

Details for the file mlflow_kubernetes_plugins-1.2.0.tar.gz.

File metadata

File hashes

Hashes for mlflow_kubernetes_plugins-1.2.0.tar.gz
Algorithm Hash digest
SHA256 b6156986fa06eed6de0a066c294c1793d8a57c6b138a7a9f436b3136383b4f35
MD5 ea4c6e6e9791ee63df5a270d1455f0e1
BLAKE2b-256 ea0368ed37327d576722d8e4464ad8211fc4dd4e143c4b7e96e46940774a33c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for mlflow_kubernetes_plugins-1.2.0.tar.gz:

Publisher: publish.yml on opendatahub-io/mlflow-kubernetes-plugins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mlflow_kubernetes_plugins-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mlflow_kubernetes_plugins-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 82853a3f6f0907998df0e3ff78c6b87e532e381946517e01221a8bd59243ef6b
MD5 138a3c96c6976ca94b7f090b9e91cc1c
BLAKE2b-256 ae8a63eb02d79a6646a04b570b696e9dd66f45b4eeb29d4f55d897c241f5d957

See more details on using hashes here.

Provenance

The following attestation bundles were made for mlflow_kubernetes_plugins-1.2.0-py3-none-any.whl:

Publisher: publish.yml on opendatahub-io/mlflow-kubernetes-plugins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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