Implementation:Bentoml BentoML Deployment Update Get List
Appearance
Overview
Deployment Update, Get, List implements the Principle:Bentoml_BentoML_Deployment_Lifecycle_Management principle by providing functions to update running deployments, retrieve deployment details, and list deployments across clusters.
API
bentoml.deployment.update()bentoml.deployment.get()bentoml.deployment.list()
Source
src/bentoml/deployment.py:L173-375
Import
import bentoml
Signatures
update()
def update(
name: str = None,
path_context: str = None,
cluster: str = None,
*,
bento: Tag | str = None,
scaling_min: int = None,
scaling_max: int = None,
instance_type: str = None,
strategy: str = None,
envs: list = None,
labels: list = None,
secrets: list[str] = None,
extras: dict = None,
config_dict: dict = None,
config_file: str = None,
args: dict = None,
) -> Deployment
get()
def get(
name: str,
cluster: str = None,
) -> Deployment
list()
def list(
cluster: str = None,
search: str = None,
q: str = None,
labels: list = None,
) -> list[Deployment]
Key Parameters
| Function | Parameter | Type | Description |
|---|---|---|---|
| update | name |
str | Deployment name to update |
| update | bento |
str | New Bento version to deploy |
| update | scaling_min |
int | Updated minimum replicas |
| update | scaling_max |
int | Updated maximum replicas |
| update | instance_type |
str | Updated compute instance type |
| update | config_file |
str | Updated YAML config file |
| get | name |
str | Deployment name to retrieve |
| get | cluster |
str | Cluster to look in (optional) |
| list | cluster |
str | Filter by cluster |
| list | search |
str | Full-text search across deployment names |
| list | q |
str | Structured query filter |
| list | labels |
list | Filter by key-value labels |
Inputs and Outputs
Inputs:
- Deployment name and updated configuration parameters (for
update) - Deployment name (for
get) - Optional filter criteria (for
list)
Outputs:
- Deployment object (for
updateandget) - list[Deployment] (for
list)
Usage Examples
Update a Deployment
import bentoml
# Update to a new Bento version with zero downtime
deployment = bentoml.deployment.update(
name="my-llm-service",
bento="llm_service:v3",
scaling_max=10,
)
print(f"Updated: {deployment.name}, status: {deployment.status}")
Get Deployment Details
import bentoml
# Retrieve deployment information
deployment = bentoml.deployment.get("my-llm-service")
print(f"Name: {deployment.name}")
print(f"Status: {deployment.status}")
print(f"Cluster: {deployment.cluster}")
print(f"Console: {deployment.admin_console}")
List All Deployments
import bentoml
# List all deployments
all_deployments = bentoml.deployment.list()
for d in all_deployments:
print(f"{d.name}: {d.status}")
# Filter by cluster
cluster_deployments = bentoml.deployment.list(cluster="gcp-us-central1")
# Search by name
search_results = bentoml.deployment.list(search="llm")
# Filter by labels
labeled = bentoml.deployment.list(labels=[{"key": "team", "value": "ml-platform"}])
CLI Usage
# Update deployment
bentoml deployment update my-llm-service --bento llm_service:v3
# Get deployment info
bentoml deployment get my-llm-service
# List deployments
bentoml deployment list
bentoml deployment list --cluster gcp-us-central1
bentoml deployment list --search llm
Metadata
| Property | Value |
|---|---|
| Implementation | Deployment Update, Get, List |
| API | bentoml.deployment.update(), .get(), .list()
|
| Source | src/bentoml/deployment.py:L173-375
|
| Domain | ML_Serving, Cloud_Deployment, Operations |
| Workflow | BentoCloud_Deployment |
| Principle | Principle:Bentoml_BentoML_Deployment_Lifecycle_Management |
Knowledge Sources
Related Pages
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment