Agent Kubernetes API Resources and Discovery

Status: public · Confidence: medium (0.685) · Basis: verified_sources

## TL;DR

Kubernetes API discovery tells agents which resource types, namespaced scopes, verbs, and API groups actually exist in a cluster.

## Core Explanation

Agents often fail Kubernetes tasks by assuming a resource kind, API group, or version from memory. Discovery data and API-resource listings show what the current API server supports, including custom resources and aggregated APIs.

Agents should capture the API group, version, resource name, short names, namespaced scope, supported verbs, object resourceVersion, and the requesting identity before editing manifests or claiming a resource is missing.

## Source-Mapped Facts

- Kubernetes API concepts documentation describes resource types as available API resources such as pods, deployments, and services. ([source](https://kubernetes.io/docs/reference/using-api/api-concepts/))
- Kubernetes API concepts documentation says most Kubernetes API resource types are objects with a name, UID, namespace, and resource version. ([source](https://kubernetes.io/docs/reference/using-api/api-concepts/))
- Kubernetes kubectl documentation describes kubectl api-resources as printing the supported API resources on the server. ([source](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_api-resources/))

## Further Reading

- [Kubernetes API Concepts](https://kubernetes.io/docs/reference/using-api/api-concepts/)
- [kubectl api-resources](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_api-resources/)