Skip to content

Kubernetes API

by kubernetes.io

API keyHTTPSDevelopment
Open documentation ↗

Overview

Kubernetes, also known as K8s, is an open source system for automating deployment, scaling, and management of containerized applications. It groups containers that make up an application into logical units for easy management and discovery. Kubernetes builds upon 15 years of experience of running production workloads at Google, combined with best-of-breed ideas and practices from the community. Pl

Kubernetes is a development API from kubernetes.io. Requests are authenticated with an API key. It is served over HTTPS. Its OpenAPI description documents 821 endpoints.

At a glance

Authentication
API key
HTTPS
Yes
CORS
Unknown
Category
Development
Base URL
https://kubernetes.local
Version
unversioned
Endpoints
821
Spec updated
2023-03-06

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "https://kubernetes.local/.well-known/openid-configuration/" \
  -H "Accept: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
JavaScript
const response = await fetch("https://kubernetes.local/.well-known/openid-configuration/", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    "GET",
    "https://kubernetes.local/.well-known/openid-configuration/",
    headers={
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
GET/.well-known/openid-configuration/get service account issuer OpenID configuration, also known as the 'OIDC discovery doc'
GET/api/get available API versions
GET/api/v1/get available resources
GET/api/v1/componentstatuseslist objects of kind ComponentStatus
GET/api/v1/componentstatuses/{name}read the specified ComponentStatus
GET/api/v1/configmapslist or watch objects of kind ConfigMap
GET/api/v1/endpointslist or watch objects of kind Endpoints
GET/api/v1/eventslist or watch objects of kind Event
GET/api/v1/limitrangeslist or watch objects of kind LimitRange
GET/api/v1/namespaceslist or watch objects of kind Namespace
POST/api/v1/namespacescreate a Namespace
POST/api/v1/namespaces/{namespace}/bindingscreate a Binding
GET/api/v1/namespaces/{namespace}/configmapslist or watch objects of kind ConfigMap
POST/api/v1/namespaces/{namespace}/configmapscreate a ConfigMap
DELETE/api/v1/namespaces/{namespace}/configmapsdelete collection of ConfigMap
GET/api/v1/namespaces/{namespace}/configmaps/{name}read the specified ConfigMap
PUT/api/v1/namespaces/{namespace}/configmaps/{name}replace the specified ConfigMap
PATCH/api/v1/namespaces/{namespace}/configmaps/{name}partially update the specified ConfigMap
DELETE/api/v1/namespaces/{namespace}/configmaps/{name}delete a ConfigMap
GET/api/v1/namespaces/{namespace}/endpointslist or watch objects of kind Endpoints
POST/api/v1/namespaces/{namespace}/endpointscreate Endpoints
DELETE/api/v1/namespaces/{namespace}/endpointsdelete collection of Endpoints
GET/api/v1/namespaces/{namespace}/endpoints/{name}read the specified Endpoints
PUT/api/v1/namespaces/{namespace}/endpoints/{name}replace the specified Endpoints
PATCH/api/v1/namespaces/{namespace}/endpoints/{name}partially update the specified Endpoints
DELETE/api/v1/namespaces/{namespace}/endpoints/{name}delete Endpoints
GET/api/v1/namespaces/{namespace}/eventslist or watch objects of kind Event
POST/api/v1/namespaces/{namespace}/eventscreate an Event
DELETE/api/v1/namespaces/{namespace}/eventsdelete collection of Event
GET/api/v1/namespaces/{namespace}/events/{name}read the specified Event
PUT/api/v1/namespaces/{namespace}/events/{name}replace the specified Event
PATCH/api/v1/namespaces/{namespace}/events/{name}partially update the specified Event
DELETE/api/v1/namespaces/{namespace}/events/{name}delete an Event
GET/api/v1/namespaces/{namespace}/limitrangeslist or watch objects of kind LimitRange
POST/api/v1/namespaces/{namespace}/limitrangescreate a LimitRange
DELETE/api/v1/namespaces/{namespace}/limitrangesdelete collection of LimitRange
GET/api/v1/namespaces/{namespace}/limitranges/{name}read the specified LimitRange
PUT/api/v1/namespaces/{namespace}/limitranges/{name}replace the specified LimitRange
PATCH/api/v1/namespaces/{namespace}/limitranges/{name}partially update the specified LimitRange
DELETE/api/v1/namespaces/{namespace}/limitranges/{name}delete a LimitRange
GET/api/v1/namespaces/{namespace}/persistentvolumeclaimslist or watch objects of kind PersistentVolumeClaim
POST/api/v1/namespaces/{namespace}/persistentvolumeclaimscreate a PersistentVolumeClaim
DELETE/api/v1/namespaces/{namespace}/persistentvolumeclaimsdelete collection of PersistentVolumeClaim
GET/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}read the specified PersistentVolumeClaim
PUT/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}replace the specified PersistentVolumeClaim
PATCH/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}partially update the specified PersistentVolumeClaim
DELETE/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}delete a PersistentVolumeClaim
GET/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/statusread status of the specified PersistentVolumeClaim
PUT/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/statusreplace status of the specified PersistentVolumeClaim
PATCH/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/statuspartially update status of the specified PersistentVolumeClaim
GET/api/v1/namespaces/{namespace}/podslist or watch objects of kind Pod
POST/api/v1/namespaces/{namespace}/podscreate a Pod
DELETE/api/v1/namespaces/{namespace}/podsdelete collection of Pod
GET/api/v1/namespaces/{namespace}/pods/{name}read the specified Pod
PUT/api/v1/namespaces/{namespace}/pods/{name}replace the specified Pod
PATCH/api/v1/namespaces/{namespace}/pods/{name}partially update the specified Pod
DELETE/api/v1/namespaces/{namespace}/pods/{name}delete a Pod
GET/api/v1/namespaces/{namespace}/pods/{name}/attachconnect GET requests to attach of Pod
POST/api/v1/namespaces/{namespace}/pods/{name}/attachconnect POST requests to attach of Pod
POST/api/v1/namespaces/{namespace}/pods/{name}/bindingcreate binding of a Pod
GET/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainersread ephemeralcontainers of the specified Pod
PUT/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainersreplace ephemeralcontainers of the specified Pod
PATCH/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainerspartially update ephemeralcontainers of the specified Pod
POST/api/v1/namespaces/{namespace}/pods/{name}/evictioncreate eviction of a Pod
GET/api/v1/namespaces/{namespace}/pods/{name}/execconnect GET requests to exec of Pod
POST/api/v1/namespaces/{namespace}/pods/{name}/execconnect POST requests to exec of Pod
GET/api/v1/namespaces/{namespace}/pods/{name}/logread log of the specified Pod
GET/api/v1/namespaces/{namespace}/pods/{name}/portforwardconnect GET requests to portforward of Pod
POST/api/v1/namespaces/{namespace}/pods/{name}/portforwardconnect POST requests to portforward of Pod
GET/api/v1/namespaces/{namespace}/pods/{name}/proxyconnect GET requests to proxy of Pod
POST/api/v1/namespaces/{namespace}/pods/{name}/proxyconnect POST requests to proxy of Pod
PUT/api/v1/namespaces/{namespace}/pods/{name}/proxyconnect PUT requests to proxy of Pod
PATCH/api/v1/namespaces/{namespace}/pods/{name}/proxyconnect PATCH requests to proxy of Pod
DELETE/api/v1/namespaces/{namespace}/pods/{name}/proxyconnect DELETE requests to proxy of Pod
GET/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}connect GET requests to proxy of Pod
POST/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}connect POST requests to proxy of Pod
PUT/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}connect PUT requests to proxy of Pod
PATCH/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}connect PATCH requests to proxy of Pod
DELETE/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}connect DELETE requests to proxy of Pod
GET/api/v1/namespaces/{namespace}/pods/{name}/statusread status of the specified Pod
PUT/api/v1/namespaces/{namespace}/pods/{name}/statusreplace status of the specified Pod
PATCH/api/v1/namespaces/{namespace}/pods/{name}/statuspartially update status of the specified Pod
GET/api/v1/namespaces/{namespace}/podtemplateslist or watch objects of kind PodTemplate
POST/api/v1/namespaces/{namespace}/podtemplatescreate a PodTemplate
DELETE/api/v1/namespaces/{namespace}/podtemplatesdelete collection of PodTemplate
GET/api/v1/namespaces/{namespace}/podtemplates/{name}read the specified PodTemplate
PUT/api/v1/namespaces/{namespace}/podtemplates/{name}replace the specified PodTemplate
PATCH/api/v1/namespaces/{namespace}/podtemplates/{name}partially update the specified PodTemplate
DELETE/api/v1/namespaces/{namespace}/podtemplates/{name}delete a PodTemplate
GET/api/v1/namespaces/{namespace}/replicationcontrollerslist or watch objects of kind ReplicationController
POST/api/v1/namespaces/{namespace}/replicationcontrollerscreate a ReplicationController
DELETE/api/v1/namespaces/{namespace}/replicationcontrollersdelete collection of ReplicationController
GET/api/v1/namespaces/{namespace}/replicationcontrollers/{name}read the specified ReplicationController
PUT/api/v1/namespaces/{namespace}/replicationcontrollers/{name}replace the specified ReplicationController
PATCH/api/v1/namespaces/{namespace}/replicationcontrollers/{name}partially update the specified ReplicationController
DELETE/api/v1/namespaces/{namespace}/replicationcontrollers/{name}delete a ReplicationController
GET/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scaleread scale of the specified ReplicationController
PUT/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scalereplace scale of the specified ReplicationController
PATCH/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scalepartially update scale of the specified ReplicationController
GET/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/statusread status of the specified ReplicationController

Showing the first 100 of 821 endpoints; the full list is in the documentation.

Questions

Does the Kubernetes API need an API key?

Yes. The Kubernetes API uses API key authentication; the documentation explains how to get credentials.

Does the Kubernetes API support HTTPS?

Yes, the Kubernetes API is served over HTTPS.

How many endpoints does the Kubernetes API have?

Its OpenAPI description lists 821 endpoints in version unversioned. The first 100 are shown on this page.

What are alternatives to the Kubernetes API?

Other Development APIs include Cloudflare, Azure DevOps, IPify, App Store Connect API, StackExchange.

Compare alternatives →

Listed from APIs.guru (CC0).