You are viewing documentation for Kubernetes version: v1.29
Kubernetes v1.29 documentation is no longer actively maintained. The version you are currently viewing is a static snapshot. For up-to-date information, see the latest version.
ResourceClass v1alpha2
apiVersion: resource.k8s.io/v1alpha2
import "k8s.io/api/resource/v1alpha2"
ResourceClass
ResourceClass is used by administrators to influence how resources are allocated.
This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
-
apiVersion: resource.k8s.io/v1alpha2
-
kind: ResourceClass
-
metadata (ObjectMeta)
Standard object metadata
-
driverName (string), required
DriverName defines the name of the dynamic resource driver that is used for allocation of a ResourceClaim that uses this class.
Resource drivers have a unique name in forward domain order (acme.example.com).
-
parametersRef (ResourceClassParametersReference)
ParametersRef references an arbitrary separate object that may hold parameters that will be used by the driver when allocating a resource that uses this class. A dynamic resource driver can distinguish between parameters stored here and and those stored in ResourceClaimSpec.
ResourceClassParametersReference contains enough information to let you locate the parameters for a ResourceClass.
-
parametersRef.kind (string), required
Kind is the type of resource being referenced. This is the same value as in the parameter object's metadata.
-
parametersRef.name (string), required
Name is the name of resource being referenced.
-
parametersRef.apiGroup (string)
APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.
-
parametersRef.namespace (string)
Namespace that contains the referenced resource. Must be empty for cluster-scoped resources and non-empty for namespaced resources.
-
-
suitableNodes (NodeSelector)
Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a ResourceClaim that has not been allocated yet.
Setting this field is optional. If null, all nodes are candidates.
A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.
-
suitableNodes.nodeSelectorTerms ([]NodeSelectorTerm), required
Required. A list of node selector terms. The terms are ORed.
A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
-
suitableNodes.nodeSelectorTerms.matchExpressions ([]NodeSelectorRequirement)
A list of node selector requirements by node's labels.
-
suitableNodes.nodeSelectorTerms.matchFields ([]NodeSelectorRequirement)
A list of node selector requirements by node's fields.
-
-
ResourceClassList
ResourceClassList is a collection of classes.
-
apiVersion: resource.k8s.io/v1alpha2
-
kind: ResourceClassList
-
metadata (ListMeta)
Standard list metadata
-
items ([]ResourceClass), required
Items is the list of resource classes.
Operations
get
read the specified ResourceClass
HTTP Request
GET /apis/resource.k8s.io/v1alpha2/resourceclasses/{name}
Parameters
-
name (in path): string, required
name of the ResourceClass
-
pretty (in query): string
Response
200 (ResourceClass): OK
401: Unauthorized
list
list or watch objects of kind ResourceClass
HTTP Request
GET /apis/resource.k8s.io/v1alpha2/resourceclasses
Parameters
-
allowWatchBookmarks (in query): boolean
-
continue (in query): string
-
fieldSelector (in query): string
-
labelSelector (in query): string
-
limit (in query): integer
-
pretty (in query): string
-
resourceVersion (in query): string
-
resourceVersionMatch (in query): string
-
sendInitialEvents (in query): boolean
-
timeoutSeconds (in query): integer
-
watch (in query): boolean
Response
200 (ResourceClassList): OK
401: Unauthorized
create
create a ResourceClass
HTTP Request
POST /apis/resource.k8s.io/v1alpha2/resourceclasses
Parameters
-
body: ResourceClass, required
-
dryRun (in query): string
-
fieldManager (in query): string
-
fieldValidation (in query): string
-
pretty (in query): string
Response
200 (ResourceClass): OK
201 (ResourceClass): Created
202 (ResourceClass): Accepted
401: Unauthorized
update
replace the specified ResourceClass
HTTP Request
PUT /apis/resource.k8s.io/v1alpha2/resourceclasses/{name}
Parameters
-
name (in path): string, required
name of the ResourceClass
-
body: ResourceClass, required
-
dryRun (in query): string
-
fieldManager (in query): string
-
fieldValidation (in query): string
-
pretty (in query): string
Response
200 (ResourceClass): OK
201 (ResourceClass): Created
401: Unauthorized
patch
partially update the specified ResourceClass
HTTP Request
PATCH /apis/resource.k8s.io/v1alpha2/resourceclasses/{name}
Parameters
-
name (in path): string, required
name of the ResourceClass
-
body: Patch, required
-
dryRun (in query): string
-
fieldManager (in query): string
-
fieldValidation (in query): string
-
force (in query): boolean
-
pretty (in query): string
Response
200 (ResourceClass): OK
201 (ResourceClass): Created
401: Unauthorized
delete
delete a ResourceClass
HTTP Request
DELETE /apis/resource.k8s.io/v1alpha2/resourceclasses/{name}
Parameters
-
name (in path): string, required
name of the ResourceClass
-
body: DeleteOptions
-
dryRun (in query): string
-
gracePeriodSeconds (in query): integer
-
pretty (in query): string
-
propagationPolicy (in query): string
Response
200 (ResourceClass): OK
202 (ResourceClass): Accepted
401: Unauthorized
deletecollection
delete collection of ResourceClass
HTTP Request
DELETE /apis/resource.k8s.io/v1alpha2/resourceclasses
Parameters
-
body: DeleteOptions
-
continue (in query): string
-
dryRun (in query): string
-
fieldSelector (in query): string
-
gracePeriodSeconds (in query): integer
-
labelSelector (in query): string
-
limit (in query): integer
-
pretty (in query): string
-
propagationPolicy (in query): string
-
resourceVersion (in query): string
-
resourceVersionMatch (in query): string
-
sendInitialEvents (in query): boolean
-
timeoutSeconds (in query): integer
Response
200 (Status): OK
401: Unauthorized
This page is automatically generated.
If you plan to report an issue with this page, mention that the page is auto-generated in your issue description. The fix may need to happen elsewhere in the Kubernetes project.