MetorialDocs

Set up Kubernetes in Metorial for Claude, ChatGPT and Cursor

Share Kubernetes with your team in Claude, ChatGPT and Cursor through Metorial: bearer token or kubeconfig sign-in, 13 tools (4 read-only).

To give your team Kubernetes in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Kubernetes integration in a Metorial portal, and each person connects with a bearer token. Agents can manage and orchestrate containerized applications on Kubernetes clusters. The integration has 13 tools, 4 read-only, 8 write and 1 destructive, plus 2 triggers.

What you'll learn

  • How an admin shares Kubernetes in a portal and how each person connects
  • What Kubernetes asks for when you connect, and where to find it
  • How to keep the 4 read-only tools and reject the other 9

Before you start

Sign-in methods

MethodTypeWhat a person provides
Bearer Token (default)API tokentoken and caCertificate
KubeconfigCustom credentialskubeconfig
Client CertificateCustom credentialsclientCertificate, clientKey and caCertificate

The portal and metorial setup use Bearer Token unless someone picks another method.

Bearer Token

To connect, a person enters these values:

  • token: Kubernetes bearer token (Service Account token or other JWT)
  • caCertificate (optional): PEM-encoded CA certificate to verify the API server

Kubeconfig

To connect, a person enters:

  • kubeconfig: Full kubeconfig file contents (YAML). The current-context will be used.

Client Certificate

To connect, a person enters these values:

  • clientCertificate: PEM-encoded client certificate signed by the cluster CA
  • clientKey: PEM-encoded client private key
  • caCertificate (optional): PEM-encoded CA certificate to verify the API server

Setup settings

Whichever method you pick, setup also asks for:

  • clusterUrl: The Kubernetes API server URL (e.g. https://my-cluster.example.com:6443)
  • namespace (optional): Default namespace for operations. If not set, defaults to "default"
  • skipTlsVerify (optional): Skip TLS certificate verification for the API server. Use with caution.

Admin: share Kubernetes in a portal

In the dashboard

Open Shared Resources

Open Workforce, choose the portal, and select Shared Resources under Access.

Share a new integration

Select Share a Resource, then New Integration, and choose Kubernetes. Under Auth Method, keep Bearer Token or pick another. For how members connect, choose Each person connects so everyone enters their own bearer token, or Shared connection to enter one bearer token for everyone.

Limit the tools

Under Tool Filters, set the write and destructive groups to Reject if agents should only read from Kubernetes.

Choose who gets it

Add the access groups that should see Kubernetes. When a person asks for access from the portal, the request appears under Access Requests.

With the CLI

The CLI cannot create the per-user Kubernetes integration. Once it exists, check which groups have it:

metorial-admin portals access list <portal-id> --type provider_template --search kubernetes

Employee: connect Kubernetes

In the portal

Open Kubernetes in the catalog

Sign in to your portal and open Kubernetes. The status reads Available.

Authenticate

Under Quick setup, select Authenticate. In the setup window, enter your bearer token (token).

Confirm

The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.

With the CLI

metorial catalog search kubernetes
metorial setup <catalog-item-id>

catalog search prints the catalog item ID. metorial setup uses Bearer Token. To connect with Kubeconfig instead, find its ID with metorial catalog get <catalog-item-id> and add --auth-method <auth-method-id>.

Add it to your AI client

metorial install adds your Kubernetes connection to a local MCP client such as Claude Code, Cursor or Codex. metorial list prints the integration ID and metorial client list the client identifiers.

metorial list kubernetes
metorial client list
metorial install <client-identifier> <integration-id>

For a client that takes a server URL, such as ChatGPT, metorial install custom <integration-id> creates an installation token and shows the endpoint details.

Make it read-only

Open the integration's Tool Filters and set the write and destructive groups to Reject. Agents keep the 4 read-only tools, such as cluster_info and get_pod_logs, and lose the 8 write tools, such as manage_job or manage_rbac, and the destructive tool delete_resource.

Employees see the result on the integration's page in the portal under Tool access. For the full walkthrough, see Tool permissions.

Check it worked

metorial list kubernetes
metorial tools <integration-id>
metorial call <integration-id> cluster_info -d '{}'

metorial tools lists the 13 tools, minus any you rejected. cluster_info takes no input. It retrieves general information about the Kubernetes cluster, including the API server version and a summary of all worker nodes with their status, capacity, and versions.

To see every input a tool takes, run metorial schema <integration-id> <tool-key>.

Tools

Read-only tools (4)

  • cluster_info: Retrieve general information about the Kubernetes cluster, including the API server version and a summary of all worker nodes with their status, capacity, and versions.
  • get_pod_logs: Retrieve logs from a specific pod. Needs podName.
  • list_resources: List Kubernetes resources of a given type. Needs resourceType.
  • get_resource: Retrieve the full details of a specific Kubernetes resource by name and type. Needs resourceType and resourceName.

Write tools (8)

  • manage_namespace: Create, update, or list Kubernetes namespaces. Needs action.
  • manage_rbac: Create or update RBAC resources: Roles, ClusterRoles, RoleBindings, and ClusterRoleBindings. Needs action, resourceKind and resourceName.
  • manage_config_storage: Create or update Kubernetes ConfigMaps and Secrets. Needs action, resourceKind and resourceName.
  • apply_resource: Apply a Kubernetes resource manifest (similar to `kubectl apply`). Needs manifest.
  • manage_service: Create or update a Kubernetes Service, including ClusterIP, NodePort, LoadBalancer, and ExternalName types. Needs action and serviceName.
  • manage_job: Create or inspect Kubernetes Jobs and CronJobs. Needs action and jobName.
  • manage_deployment: Create, update, scale, or restart a Kubernetes Deployment. Needs action and deploymentName.
  • manage_autoscaler: Create, update, or get the status of a HorizontalPodAutoscaler (HPA). Needs action and hpaName.

Destructive tools (1)

  • delete_resource: Delete a Kubernetes resource by type and name. Needs resourceType and resourceName.

Triggers

Kubernetes has 2 triggers, which fire on events in Kubernetes:

  • inbound_webhook
  • resource_events: Polls for new Kubernetes events across the cluster or within a specific namespace.

Next steps