kubectl plugin for deploying marimo notebooks to Kubernetes
Project description
kubectl-marimo
Deploy marimo notebooks to Kubernetes.
Installation
# With uv (recommended)
uv tool install kubectl-marimo
# With uvx (no install)
uvx kubectl-marimo edit notebook.py
# With pip
pip install kubectl-marimo
Quick Start
# Edit a notebook interactively
kubectl marimo edit notebook.py
# Run as read-only app
kubectl marimo run notebook.py
# With cloud storage
kubectl marimo edit --source=cw://my-bucket/data notebook.py
# Sync changes back
kubectl marimo sync notebook.py
# Delete deployment
kubectl marimo delete notebook.py
# List active deployments
kubectl marimo status
Commands
edit
Create or edit notebooks in the cluster (interactive mode).
kubectl marimo edit [OPTIONS] [FILE]
Options:
-n, --namespace- Kubernetes namespace (default: "default")--source- Data source URI (cw://, sshfs://, rsync://)--dry-run- Print YAML without applying-f, --force- Overwrite without prompting
Examples:
# Edit existing notebook
kubectl marimo edit notebook.py
# Edit with S3 data mounted
kubectl marimo edit --source=cw://bucket/data notebook.py
# Edit in staging namespace
kubectl marimo edit -n staging notebook.py
run
Run a notebook as a read-only application.
kubectl marimo run [OPTIONS] FILE
Options: Same as edit
Examples:
# Run notebook as app
kubectl marimo run dashboard.py
# Run with data source
kubectl marimo run --source=cw://bucket/reports dashboard.py
sync
Pull changes from pod back to local file.
kubectl marimo sync [OPTIONS] FILE
Options:
-n, --namespace- Kubernetes namespace-f, --force- Overwrite local file without prompting
delete
Delete notebook deployment from cluster.
kubectl marimo delete [OPTIONS] FILE
Options:
-n, --namespace- Kubernetes namespace--delete-pvc- Also delete PersistentVolumeClaim (PVC is preserved by default)--no-sync- Delete without syncing changes back
status
List active notebook deployments.
kubectl marimo status [DIRECTORY]
Configuration
Configure deployments via frontmatter in your notebook.
Markdown (.md)
---
title: my-analysis
image: ghcr.io/marimo-team/marimo:latest
storage: 5Gi
env:
DEBUG: "true"
API_KEY:
secret: my-secret
key: api-key
mounts:
- cw://my-bucket/data
---
Python (.py)
# /// script
# dependencies = ["marimo", "pandas"]
# ///
# [tool.marimo.k8s]
# image = "ghcr.io/marimo-team/marimo:latest"
# storage = "5Gi"
#
# [tool.marimo.k8s.env]
# DEBUG = "true"
Frontmatter Fields
| Field | Description | Default |
|---|---|---|
| title | Resource name | filename |
| image | Container image | ghcr.io/marimo-team/marimo:latest |
| port | Server port | 2718 |
| storage | PVC size | none (ephemeral) |
| auth | Set to "none" to disable | token auth |
| env | Environment variables | none |
| mounts | Data source URIs | none |
Environment Variables
Inline values:
env:
DEBUG: "true"
LOG_LEVEL: "info"
From Kubernetes secrets:
env:
API_KEY:
secret: my-secret
key: api-key
DB_PASSWORD:
secret: db-credentials
key: password
Mount URIs
| Scheme | Description | Example |
|---|---|---|
| cw:// | CoreWeave Object Storage | cw://bucket/path |
| sshfs:// | SSH filesystem mount | sshfs://user@host:/path |
| rsync:// | Local directory sync | rsync://./data:/notebooks |
Local rsync:// URIs sync a directory to the pod via kubectl cp. Remote URIs (rsync://user@host:/path) create a sidecar for continuous sync.
Requirements
- Kubernetes cluster with marimo-operator installed
- kubectl configured to access the cluster
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kubectl_marimo-0.2.3.tar.gz.
File metadata
- Download URL: kubectl_marimo-0.2.3.tar.gz
- Upload date:
- Size: 59.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fbf429e46e5194c47c5a2b528a34a6ff6af9f25d863caeb947ca16ce6ef8fd2
|
|
| MD5 |
007efc62939ed35fab13dbe1293a1aba
|
|
| BLAKE2b-256 |
774b63751905290cf557426eb7aebff697642e0f108b0466484eaf4c61b289de
|
Provenance
The following attestation bundles were made for kubectl_marimo-0.2.3.tar.gz:
Publisher:
publish-plugin.yml on marimo-team/marimo-operator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kubectl_marimo-0.2.3.tar.gz -
Subject digest:
9fbf429e46e5194c47c5a2b528a34a6ff6af9f25d863caeb947ca16ce6ef8fd2 - Sigstore transparency entry: 798916368
- Sigstore integration time:
-
Permalink:
marimo-team/marimo-operator@40fc0bc9764c0f97ea076d7ce3a29106a32aa8a8 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/marimo-team
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-plugin.yml@40fc0bc9764c0f97ea076d7ce3a29106a32aa8a8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file kubectl_marimo-0.2.3-py3-none-any.whl.
File metadata
- Download URL: kubectl_marimo-0.2.3-py3-none-any.whl
- Upload date:
- Size: 27.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3756393ff7683fe79bd68e91b476231ab0a160f3f4107d59af4d3fdd61c1258
|
|
| MD5 |
2870968f1e032b2cc66b84bd92669b1a
|
|
| BLAKE2b-256 |
f2628f9b81c3b803d0dd8a177f28c7e4cc9b036d61b2419f28d3558c3a7d040c
|
Provenance
The following attestation bundles were made for kubectl_marimo-0.2.3-py3-none-any.whl:
Publisher:
publish-plugin.yml on marimo-team/marimo-operator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kubectl_marimo-0.2.3-py3-none-any.whl -
Subject digest:
e3756393ff7683fe79bd68e91b476231ab0a160f3f4107d59af4d3fdd61c1258 - Sigstore transparency entry: 798916373
- Sigstore integration time:
-
Permalink:
marimo-team/marimo-operator@40fc0bc9764c0f97ea076d7ce3a29106a32aa8a8 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/marimo-team
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-plugin.yml@40fc0bc9764c0f97ea076d7ce3a29106a32aa8a8 -
Trigger Event:
push
-
Statement type: