Skip to main content
Glama

daemonset_update

Update DaemonSets in Kubernetes clusters by specifying namespace, context, and desired container image. Returns the operation status for tracking changes.

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
imageYes
nameYes
namespaceYes

Implementation Reference

  • The daemonset_update tool handler: reads the existing DaemonSet, updates its first container's image, and replaces it using the Kubernetes AppsV1Api.
    @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"}
  • Registration of the daemonset_update tool using the @mcp.tool() decorator.
    @mcp.tool()

Other Tools

Related Tools

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