Skip to main content
Glama

ingress_update

Update Kubernetes Ingress configurations to modify host routing and backend service connections for managing external access to applications.

Instructions

Update an existing Ingress in the specified namespace.

Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The Ingress name host: The new host for the Ingress service_name: The new backend service name service_port: The new backend service port

Returns: Status of the update operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes
nameYes
hostYes
service_nameYes
service_portYes

Implementation Reference

  • The main handler function for the 'ingress_update' tool, which updates an existing Kubernetes Ingress resource by modifying its host, backend service name, and service port.
    def ingress_update(context_name: str, namespace: str, name: str, host: str, service_name: str, service_port: int): """ Update an existing Ingress in the specified namespace. Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The Ingress name host: The new host for the Ingress service_name: The new backend service name service_port: The new backend service port Returns: Status of the update operation """ networking_v1: NetworkingV1Api = get_api_clients(context_name)["networking"] ingress = networking_v1.read_namespaced_ingress(name=name, namespace=namespace) ingress.spec.rules[0].host = host ingress.spec.rules[0].http.paths[0].backend.service.name = service_name ingress.spec.rules[0].http.paths[0].backend.service.port.number = service_port updated_ingress = networking_v1.replace_namespaced_ingress(name=name, namespace=namespace, body=ingress) return {"name": updated_ingress.metadata.name, "status": "Updated"}
  • The @mcp.tool() decorator registers the ingress_update function as an MCP tool.
    @mcp.tool()

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