service_create
Create Kubernetes Services in specified namespaces using context name, labels, ports, and service type. Simplify resource management on the k8s-pilot MCP server.
Instructions
Create a Service in the specified namespace.
Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The Service name selector: A dictionary of labels to select the target pods ports: A list of ports (e.g., [{"port": 80, "target_port": 8080}]) service_type: The type of the Service (default is "ClusterIP")
Returns: Status of the creation operation
Input Schema
Name | Required | Description | Default |
---|---|---|---|
context_name | Yes | ||
name | Yes | ||
namespace | Yes | ||
ports | Yes | ||
selector | Yes | ||
service_type | No | ClusterIP |
Input Schema (JSON Schema)
{
"properties": {
"context_name": {
"title": "Context Name",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"namespace": {
"title": "Namespace",
"type": "string"
},
"ports": {
"items": {},
"title": "Ports",
"type": "array"
},
"selector": {
"additionalProperties": true,
"title": "Selector",
"type": "object"
},
"service_type": {
"default": "ClusterIP",
"title": "Service Type",
"type": "string"
}
},
"required": [
"context_name",
"namespace",
"name",
"selector",
"ports"
],
"title": "service_createArguments",
"type": "object"
}