get_k8s_resource
ActiveTool of com.googleapis.container/mcp
declared in ESF
Gets one or more Kubernetes resources from a cluster. Resources can be filtered by type, name, namespace, and label selectors. Returns the resources in YAML format. This is similar to running `kubectl get`.
Parameters schema
{
"type": "object",
"required": [
"parent",
"resourceType"
],
"properties": {
"name": {
"type": "string",
"description": "Optional. The name of the resource to retrieve. If not specified, all resources of the given type are returned."
},
"parent": {
"type": "string",
"description": "Required. The cluster, which owns this collection of resources. Format: projects/{project}/locations/{location}/clusters/{cluster}"
},
"namespace": {
"type": "string",
"description": "Optional. The namespace of the resource. If not specified, all namespaces are searched."
},
"outputFormat": {
"enum": [
"OUTPUT_FORMAT_UNSPECIFIED",
"TABLE",
"WIDE",
"YAML",
"JSON"
],
"type": "string",
"description": "Optional. The output format. One of: (table, wide, yaml, json). If not specified, defaults to table. When both custom_columns and output_format are specified, output_format is ignored.",
"x-google-enum-descriptions": [
"If not specified, defaults to table.",
"Output in table format.",
"Output in wide table format.",
"Output in yaml format.",
"Output in json format."
]
},
"resourceType": {
"type": "string",
"description": "Required. The type of resource to retrieve. Kubernetes resource/kind name in singular form, lower case. e.g. \"pod\", \"deployment\", \"service\"."
},
"customColumns": {
"type": "string",
"format": "google-fieldmask",
"pattern": "^(\\s*[^,\\s.]+(\\s*[,.]\\s*[^,\\s.]+)*)?$",
"description": "Optional. The field mask to specify columns to display. Use a single \"*\" to get all fields. When both custom_columns and output_format are specified, output_format is ignored."
},
"fieldSelector": {
"type": "string",
"description": "Optional. A field selector to filter resources."
},
"labelSelector": {
"type": "string",
"description": "Optional. A label selector to filter resources."
}
},
"description": "Request for retrieving Kubernetes resources."
}Parent server
com.googleapis.container/mcp
1/7 registries