Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Kubernetes Workloads API

Workload resources including Pods, Deployments, StatefulSets, DaemonSets, ReplicaSets, Jobs, and CronJobs for managing containerized applications.

Kubernetes Workloads API is one of 7 APIs that Kubernetes publishes on the APIs.io network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification.

This API exposes 1 JSON Schema definition.

Tagged areas include Workloads. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an API reference, authentication docs, an AsyncAPI specification, and 1 JSON Schema.

This API exposes 13 operations across 6 paths, and defines 22 schemas. It is described by OpenAPI 3.1.0, at version v1.32.0.

Requests are made against a single base URL, https://kubernetes.default.svc.

13 operations 6 paths 22 schemas 2 DELETE6 GET2 POST3 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
v1.32.0
Base URL
https://kubernetes.default.svc
Authentication
HTTP Bearer, Mutual TLS
Terms of Service
Resource Areas
1

Authentication & Security 2

Kubernetes Workloads API declares 2 security schemes for authenticating requests. It accepts HTTP bearer tokens (JWT) (bearerAuth). It requires mutual TLS (clientCertificate). By default, every request must be authenticated.

  • bearerAuth — Kubernetes service account token or user token issued by the cluster's authentication provider. Include in the Authorization header as 'Bearer '.
  • clientCertificate — Client certificate authentication using a TLS certificate issued by the cluster's certificate authority.

Paths & Operations 13

Across 6 paths, the API surfaces 13 operations — 2 DELETE, 6 GET, 2 POST, 3 PUT. Each is listed below with its method, path, parameters, and response codes.

Workloads 13

Workload resources including Pods, Deployments, StatefulSets, DaemonSets, ReplicaSets, Jobs, and CronJobs for managing containerized applications.

GET
/api/v1/namespaces/{namespace}/pods
Kubernetes List pods in a namespace
listNamespacedPods 7 params → 200401
POST
/api/v1/namespaces/{namespace}/pods
Kubernetes Create a pod
createNamespacedPod 1 param body → 201400401
GET
/api/v1/namespaces/{namespace}/pods/{name}
Kubernetes Get a pod
getNamespacedPod 2 params → 200401404
PUT
/api/v1/namespaces/{namespace}/pods/{name}
Kubernetes Replace a pod
replaceNamespacedPod 2 params body → 200401404
DELETE
/api/v1/namespaces/{namespace}/pods/{name}
Kubernetes Delete a pod
deleteNamespacedPod 3 params → 200401404
GET
/api/v1/namespaces/{namespace}/pods/{name}/log
Kubernetes Read pod logs
readNamespacedPodLog 6 params → 200401404
GET
/apis/apps/v1/namespaces/{namespace}/deployments
Kubernetes List deployments in a namespace
listNamespacedDeployments 5 params → 200401
POST
/apis/apps/v1/namespaces/{namespace}/deployments
Kubernetes Create a deployment
createNamespacedDeployment 1 param body → 201400401
GET
/apis/apps/v1/namespaces/{namespace}/deployments/{name}
Kubernetes Get a deployment
getNamespacedDeployment 2 params → 200401404
PUT
/apis/apps/v1/namespaces/{namespace}/deployments/{name}
Kubernetes Replace a deployment
replaceNamespacedDeployment 2 params body → 200401404
DELETE
/apis/apps/v1/namespaces/{namespace}/deployments/{name}
Kubernetes Delete a deployment
deleteNamespacedDeployment 2 params → 200401404
GET
/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale
Kubernetes Get deployment scale
getNamespacedDeploymentScale 2 params → 200401404
PUT
/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale
Kubernetes Scale a deployment
replaceNamespacedDeploymentScale 2 params body → 200401404

Schemas 22

The contract defines 22 schemas that model the data the API accepts and returns. The most detailed are ObjectMeta (10 properties), Container (8 properties), PodSpec (7 properties), Status (6 properties). Each schema is shown below with its type and property counts.

PodStatus
object
Most recently observed status of the pod. This data may not be up-to-date and is populated by the system.
5 properties
Scale
object
Scale represents the scaling subresource of a workload resource. Used to read and update the replica count independently of the full resource spec.
5 properties
Container
object
A single container to run within a pod. Defines the container image, command, environment, resource requirements, ports, and volume mounts.
8 properties 2 required
DeploymentSpec
object
Specification for a Deployment, defining the desired state including replica count, pod template, and update strategy.
6 properties 2 required
ResourceRequirements
object
Compute resource requirements for a container, specifying resource limits and requests for CPU and memory.
2 properties
LabelSelector
object
A label selector is a query over a set of resources. matchLabels specifies key-value pairs that must match, while matchExpressions supports set-based criteria.
2 properties
Pod
object
A Pod represents the smallest deployable unit in Kubernetes, encapsulating one or more containers with shared storage and network. Pods are ephemeral by nature…
5 properties
Status
object
Status is a return value for calls that don't return other objects. It is used to convey error messages, reasons, and codes for both success and failure respon…
6 properties
DeploymentStrategy
object
Strategy for replacing existing pods with new ones during an update. Supports RollingUpdate (default) and Recreate strategies.
2 properties
ListMeta
object
Metadata that all list responses include, containing pagination state and the resource version of the list.
3 properties
PodSpec
object
Specification for the desired behavior of a pod, including the containers to run, volumes to mount, scheduling constraints, and restart policy.
7 properties 1 required
PodTemplateSpec
object
Template for creating pod replicas. Contains pod metadata (labels, annotations) and a pod spec.
2 properties
ObjectMeta
object
Standard Kubernetes object metadata included on all persistent resources. Contains identifying information, ownership references, and system-managed fields lik…
10 properties
Deployment
object
A Deployment provides declarative updates for Pods and ReplicaSets. You describe a desired state in a Deployment and the controller changes the actual state to…
5 properties
PodList
object
A list of pods returned by list operations.
4 properties 1 required
DeploymentStatus
object
Most recently observed status of a Deployment including replica counts and rollout conditions.
5 properties
DeploymentList
object
A list of deployments returned by list operations.
4 properties 1 required
EnvVar
object
An environment variable to set in a container.
2 properties 1 required
ContainerPort
object
A network port that a container exposes. Used for documentation and for service discovery via protocol and port number.
4 properties 1 required
OwnerReference
object
Reference to an owning resource that manages this object's lifecycle via garbage collection.
5 properties 4 required
LabelSelectorRequirement
object
A requirement that uses set-based operators to match labels.
3 properties 2 required
PodCondition
object
Condition representing the current state of a pod component.
4 properties 2 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

kubernetes-workloads-api-openapi.yml Raw ↑

Other APIs Kubernetes publishes across the network.

Kubernetes Autoscaling API
Kubernetes Cluster API
Kubernetes Config API
Kubernetes Events API
Kubernetes Namespaces API
Kubernetes RBAC API