Skip to main content
Glama

daemonset_update

Update container images in Kubernetes DaemonSets across clusters. Specify context, namespace, name, and new image to modify deployments.

Instructions

Update an existing DaemonSet in the specified namespace.

Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The DaemonSet name image: The new container image to update

Returns: Status of the update operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes
nameYes
imageYes

Implementation Reference

  • The daemonset_update tool handler: reads the existing DaemonSet, updates the first container's image, and replaces it using Kubernetes API.
    @mcp.tool() @use_current_context @check_readonly_permission def daemonset_update(context_name: str, namespace: str, name: str, image: str): """ Update an existing DaemonSet in the specified namespace. Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The DaemonSet name image: The new container image to update Returns: Status of the update operation """ apps_v1: AppsV1Api = get_api_clients(context_name)["apps"] daemonset = apps_v1.read_namespaced_daemon_set(name=name, namespace=namespace) daemonset.spec.template.spec.containers[0].image = image updated_daemonset = apps_v1.replace_namespaced_daemon_set(name=name, namespace=namespace, body=daemonset) return {"name": updated_daemonset.metadata.name, "status": "Updated"}

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bourbonkk/k8s-pilot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server