Skip to main content

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

kubectl_marimo-0.2.4.tar.gz (61.9 kB view details)

Uploaded Source

Built Distribution

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

kubectl_marimo-0.2.4-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

Details for the file kubectl_marimo-0.2.4.tar.gz.

File metadata

  • Download URL: kubectl_marimo-0.2.4.tar.gz
  • Upload date:
  • Size: 61.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kubectl_marimo-0.2.4.tar.gz
Algorithm Hash digest
SHA256 43ceee7c0ce5c35ac130058ff2c65236738da79ec6cf65741d2ea8a3c8f62211
MD5 3a902744b07e715cf6f5cf17151f7c95
BLAKE2b-256 1ce6f3650e4b49fb3926df7995124c7fa8ba10045a6ae75eda428c5a5ae16e4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for kubectl_marimo-0.2.4.tar.gz:

Publisher: publish-plugin.yml on marimo-team/marimo-operator

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

File details

Details for the file kubectl_marimo-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: kubectl_marimo-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 27.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kubectl_marimo-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 252330a933b6776e55ecd7bf95699069ff3246910fcd3ad690eb3485a89fae67
MD5 8a433c8d0696d865e4844f30c542cf6e
BLAKE2b-256 dac7f16fc447bcd0ddbc28cf521b5a3d301f6dea89be6606e10ca8887e9ca7a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for kubectl_marimo-0.2.4-py3-none-any.whl:

Publisher: publish-plugin.yml on marimo-team/marimo-operator

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