Skip to main content
A discovery node finding custom Kubernetes APIs it has never seen, walking the API group tree, and resolving one into a structured schema with field types, a REST path, and an instance count
Kubernetes clusters often have Custom Resource Definitions (CRDs) installed by operators, service meshes, and platform tools. These are APIs the agent has never seen in its training data. Through the kube proxy, it can discover them, read their schemas, and interact with them without any pre-built tools. There are two ways to discover CRDs, each useful for different things.

Approach 1: CRD API

The CRD API lists every custom resource definition installed in the cluster (names, groups, versions, and scope):
The agent can then drill into a specific CRD to read its embedded structural schema:
Best for: “What CRDs are installed?” Quick inventory, metadata, and embedded schemas.

Approach 2: Kubernetes OpenAPI Spec

Since Kubernetes 1.15+, CRDs with structural schemas are included in the cluster’s OpenAPI spec. The agent can fetch the full API surface (including custom resources) as proper OpenAPI paths:
This gives the agent the actual REST endpoints (GET /apis/cilium.io/v2/namespaces/{ns}/ciliumnetworkpolicies) with full request/response schemas, in the same format as the Akua OpenAPI spec it already knows how to query with search. Best for: “How do I call this custom API?” Full REST paths, request bodies, and response schemas.
Use the CRD API for discovery (“what’s installed?”) and the OpenAPI spec for understanding (“how do I use it?”). An agent typically starts with the CRD API to find what’s interesting, then fetches the OpenAPI group for the full schema.

List custom resources

With the group, version, and resource name from the CRD, the agent queries instances:

Full discovery flow

The agent can chain the whole thing: discover CRDs, pick one it hasn’t seen, learn its schema, and query instances:

Why this matters

Traditional MCP servers need a pre-built tool for every API. When a cluster has CRDs from Cilium, cert-manager, Prometheus, Argo, or any other operator, those tools don’t exist. The agent is stuck. With Code Mode + the kube proxy, the agent is self-sufficient. It discovers what’s available, learns the schema, and interacts with custom resources at runtime, without any code changes to the MCP server. The API surface of the MCP grows automatically with whatever is installed in the cluster.

Kubernetes access

The kube proxy and exec endpoints that make this possible.

Cross-cluster comparison

Compare CRDs, versions, and images across your entire fleet.

Code Mode in action

How the two-tool sandbox pattern works.

Platform MCP

Connect local AI tools to Akua through Code Mode.