canonical: https://jentic.com/apis/kubernetes.io/kubernetes

# Kubernetes

The Kubernetes API is the control-plane interface for any Kubernetes cluster, exposing 933 path-method combinations across core resources, apps, batch, networking, RBAC, custom resources, and admissions webhooks for the v1.10.0 surface in this spec. Clients send REST requests to the API server to create, read, update, and watch declarative objects such as Pods, Deployments, Services, ConfigMaps, and Namespaces, and the controllers reconcile actual state to match. Authentication is typically a bearer token presented as the Authorization header, and resource access is gated by RBAC roles bound to users or service accounts. The same API serves kubectl, Helm, and operators, which makes it the canonical integration target for any tool that automates a cluster.

## For AI agents

Drive a Kubernetes cluster - create, read, update, watch, and delete workloads and configuration objects across 933 endpoints - using a bearer token bound to RBAC permissions.

## Scope

Does not handle the underlying VM provisioning, container image building, or persistent volume backends - use for control-plane operations on cluster objects only.

## Capabilities

- List, create, read, update, patch, and delete Pods, Deployments, StatefulSets, DaemonSets, and Jobs across namespaces
- Manage Services, Endpoints, Ingresses, and NetworkPolicies for cluster networking
- Create and rotate ConfigMaps and Secrets to inject configuration into workloads
- Apply RBAC by managing Roles, RoleBindings, ClusterRoles, and ClusterRoleBindings
- Watch resources for change events to drive controllers and reconciliation loops
- Scale Deployments and StatefulSets and roll out new container images via spec updates

## Use cases

### Application deployment automation

A delivery pipeline applies Deployment, Service, and ConfigMap manifests to a Kubernetes cluster by issuing POST or PATCH requests against the corresponding apps/v1 and core/v1 endpoints. The pipeline watches the rollout via /apis/apps/v1/namespaces/{namespace}/deployments/{name} status until ReadyReplicas equals desired. This is the standard CD pattern that underpins kubectl apply and tools like Argo CD or Flux.

Example prompt: Patch the Deployment 'web' in namespace 'prod' via PATCH /apis/apps/v1/namespaces/prod/deployments/web to set spec.template.spec.containers[0].image to 'web:1.4.2' and poll the status until ReadyReplicas equals desired.

### Configuration and secret management

An automation system pushes new ConfigMaps and Secrets into a cluster as part of release pipelines or feature toggles. Calls to POST /api/v1/namespaces/{namespace}/configmaps and the matching secrets path create or replace the objects, and consuming Pods pick up the new values on restart or via a sidecar reloader. The pattern keeps environment configuration declarative and auditable through cluster audit logs.

Example prompt: Create a ConfigMap via POST /api/v1/namespaces/staging/configmaps named 'feature-flags' with data {'enable_beta':'true'} and verify it appears via GET on the same path.

### Cluster observability and inventory

Operators and dashboards list and watch resources across all namespaces - Pods, Nodes, Events, PersistentVolumes - to render cluster health views and feed alerting. The API supports long-poll watches that stream change events, which removes the need for polling. Metrics-server and Prometheus rely on this surface for resource discovery.

Example prompt: Call GET /api/v1/pods?watch=true&labelSelector=app%3Dapi and stream events into the observability pipeline for 60 seconds.

### RBAC and access control management

Platform teams provision per-team or per-service-account access to the cluster by creating Roles and RoleBindings, or ClusterRoles and ClusterRoleBindings. The API endpoints under /apis/rbac.authorization.k8s.io/v1 cover every CRUD operation needed for an internal access portal that mirrors GitOps-controlled identity.

Example prompt: Create a RoleBinding via POST /apis/rbac.authorization.k8s.io/v1/namespaces/team-a/rolebindings to bind the 'developer' Role to the service account 'ci-runner'.

### Agent-driven cluster operations via Jentic

An agent searches Jentic for 'scale a kubernetes deployment' and is matched to PATCH /apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale. Jentic injects the bearer token from your Jentic One instance and returns structured JSON, letting the agent compose multi-step flows like 'find the failing Pod, describe its events, restart its parent Deployment' without holding cluster credentials.

Example prompt: Use the Jentic MCP tool kubernetes_scale_deployment to scale Deployment 'API' in namespace 'prod' to 6 replicas.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /api/v1/namespaces | List all Namespaces |
| POST | /api/v1/namespaces | Create a Namespace |
| GET | /api/v1/namespaces/{namespace}/configmaps | List ConfigMaps in a Namespace |
| POST | /api/v1/namespaces/{namespace}/configmaps | Create a ConfigMap |
| GET | /api/v1/namespaces/{namespace}/pods | List Pods in a Namespace |
| POST | /api/v1/namespaces/{namespace}/bindings | Create a Binding |
| GET | /api/v1/componentstatuses | List component statuses |

## Key resources

- **Workloads** — Pods, Deployments, StatefulSets, DaemonSets, Jobs, and CronJobs across namespaces
- **Services and networking** — Services, Endpoints, Ingresses, and NetworkPolicies
- **Configuration** — ConfigMaps and Secrets for workload configuration
- **RBAC** — Roles, RoleBindings, ClusterRoles, and ClusterRoleBindings
- **Cluster** — Nodes, Namespaces, Events, and ComponentStatuses

## Why Jentic

- **Setup:** Wiring the Kubernetes API by hand means supplying a bearer token in the Authorization header, resolving the right apiGroup and version path for each object, and pointing at your cluster's own API server. Through Jentic you install once, import the Kubernetes API from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** Kubernetes puts the namespace in the URL path (/api/v1/namespaces/{namespace}/...), so a rule can pin your agent to one namespace: it can list pods and read configmaps there and nothing else. You choose the operations it may call, so writes like creating configmaps or bindings are not included unless you add them.
- **Credential handling:** Your Kubernetes bearer token is stored once, encrypted, by your own Jentic One instance and injected into the Authorization header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'list pods in a namespace' or 'read a configmap', and Jentic returns the matching Kubernetes operation with its full input schema, abstracting the apiGroup and version path structure so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Rancher** — Multi-cluster management API that wraps and extends the Kubernetes API
- **AWS** — EKS clusters and the underlying VPC, IAM, and EBS that back many Kubernetes deployments
- **GitLab** — CI/CD source for manifests applied to a Kubernetes cluster
- **Docker Engine** — Container runtime that builds and runs the images Kubernetes orchestrates

## FAQ

### What authentication does the Kubernetes API use?

The Kubernetes API server typically authenticates clients with a bearer token presented in the Authorization header (the spec exposes this as the BearerToken scheme). Tokens are commonly issued to ServiceAccounts inside the cluster, while external clients use OIDC or kubeconfig-managed credentials. Jentic stores the bearer token encrypted in your Jentic One instance and injects it per request.

### Can I scale a Deployment with the Kubernetes API?

Yes. Issue PATCH against /apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale with a body that sets spec.replicas to the desired count, or PATCH the Deployment directly to update spec.replicas - both routes are supported.

### What are the rate limits for the Kubernetes API?

The API server applies admission rate limits via the API Priority and Fairness feature gate, configured per cluster rather than at the SaaS level. Practical ceilings depend on the control plane's capacity - list and watch operations should use resourceVersion-based watches rather than polling.

### How do I list Pods in a namespace through Jentic?

Search Jentic for 'list kubernetes pods', load GET /api/v1/namespaces/{namespace}/pods, and execute it with the namespace name. Install with pip install jentic and Jentic injects the bearer token from your Jentic One instance.

### Does this Kubernetes spec cover Custom Resources and Operators?

The v1.10.0 spec captured here covers the built-in API groups bundled in the Kubernetes 1.10 release. Custom Resources are accessed via the /apis/{group}/{version}/namespaces/{namespace}/{plural} pattern but are not enumerated here because they are cluster-specific. Use kubectl api-resources or call /apis to discover what each cluster exposes.

### Can I limit what my agent is allowed to do with the Kubernetes API?

Yes. Because Jentic One is self-hosted, your own rules decide which Kubernetes operations and which bearer token the agent may use. Kubernetes puts the namespace in the URL path, such as /api/v1/namespaces/{namespace}/pods, so you can pin the agent to a single namespace where it lists Pods and reads ConfigMaps and nothing else. You choose the operations it may call, so writes like creating ConfigMaps or Bindings are excluded unless you add them.
