API reference
MicroShift API reference
Abstract
Chapter 1. Understanding API tiers
This guidance does not cover layered MicroShift offerings.
Red Hat requests that application developers validate that any behavior they depend on is explicitly defined in the formal API documentation to prevent introducing dependencies on unspecified implementation-specific behavior or dependencies on bugs in a particular implementation of an API. For example, new releases of an ingress router may not be compatible with older releases if an application uses an undocumented API or relies on undefined behavior.
1.1. API tiers
All commercially supported APIs, components, and features are associated under one of the following support levels:
API tier 1
APIs and application operating environments (AOEs) are stable within a major release. They may be deprecated within a major release, but they will not be removed until a subsequent major release.
API tier 2
APIs and AOEs are stable within a major release for a minimum of 9 months or 3 minor releases from the announcement of deprecation, whichever is longer.
API tier 3
This level applies to languages, tools, applications, and optional Operators included with MicroShift through Operator Hub. Each component will specify a lifetime during which the API and AOE will be supported. Newer versions of language runtime specific components will attempt to be as API and AOE compatible from minor version to minor version as possible. Minor version to minor version compatibility is not guaranteed, however.
Components and developer tools that receive continuous updates through the Operator Hub, referred to as Operators and operands, should be considered API tier 3. Developers should use caution and understand how these components may change with each minor release. Users are encouraged to consult the compatibility guidelines documented by the component.
API tier 4
No compatibility is provided. API and AOE can change at any point. These capabilities should not be used by applications needing long-term support.
It is common practice for Operators to use custom resource definitions (CRDs) internally to accomplish a task. These objects are not meant for use by actors external to the Operator and are intended to be hidden. If any CRD is not meant for use by actors external to the Operator, the operators.operatorframework.io/internal-objects
annotation in the Operators ClusterServiceVersion
(CSV) should be specified to signal that the corresponding resource is internal use only and the CRD may be explicitly labeled as tier 4.
1.2. Mapping API tiers to API groups
For each API tier defined by Red Hat, we provide a mapping table for specific API groups where the upstream communities are committed to maintain forward compatibility. Any API group that does not specify an explicit compatibility level and is not specifically discussed below is assigned API tier 3 by default except for v1alpha1
APIs which are assigned tier 4 by default.
1.2.1. Support for Kubernetes API groups
API groups that end with the suffix *.k8s.io
or have the form version.<name>
with no suffix are governed by the Kubernetes deprecation policy and follow a general mapping between API version exposed and corresponding support tier unless otherwise specified.
API version example | API tier |
---|---|
| Tier 1 |
| Tier 2 |
| Tier 4 |
1.2.2. Support for OpenShift API groups
API groups that end with the suffix *.openshift.io
are governed by the MicroShift deprecation policy and follow a general mapping between API version exposed and corresponding compatibility level unless otherwise specified.
API version example | API tier |
---|---|
| Tier 1 |
|
Tier 1 except for |
1.3. API deprecation policy
MicroShift is composed of many components sourced from many upstream communities. It is anticipated that the set of components, the associated API interfaces, and correlated features will evolve over time and might require formal deprecation in order to remove the capability.
1.3.1. Deprecating parts of the API
MicroShift is a distributed system where multiple components interact with a shared state managed by the cluster control plane through a set of structured APIs. Per Kubernetes conventions, each API presented by MicroShift is associated with a group identifier and each API group is independently versioned. Each API group is managed in a distinct upstream community including Kubernetes, Metal3, Multus, Operator Framework, Open Cluster Management, OpenShift itself, and more.
While each upstream community might define their own unique deprecation policy for a given API group and version, Red Hat normalizes the community specific policy to one of the compatibility levels defined prior based on our integration in and awareness of each upstream community to simplify end-user consumption and support.
The deprecation policy and schedule for APIs vary by compatibility level.
The deprecation policy covers all elements of the API including:
- REST resources, also known as API objects
- Fields of REST resources
- Annotations on REST resources, excluding version-specific qualifiers
- Enumerated or constant values
Other than the most recent API version in each group, older API versions must be supported after their announced deprecation for a duration of no less than:
API tier | Duration |
---|---|
Tier 1 | Stable within a major release. They may be deprecated within a major release, but they will not be removed until a subsequent major release. |
Tier 2 | 9 months or 3 releases from the announcement of deprecation, whichever is longer. |
Tier 3 | See the component-specific schedule. |
Tier 4 | None. No compatibility is guaranteed. |
The following rules apply to all tier 1 APIs:
- API elements can only be removed by incrementing the version of the group.
- API objects must be able to round-trip between API versions without information loss, with the exception of whole REST resources that do not exist in some versions. In cases where equivalent fields do not exist between versions, data will be preserved in the form of annotations during conversion.
- API versions in a given group can not deprecate until a new API version at least as stable is released, except in cases where the entire API object is being removed.
1.3.2. Deprecating CLI elements
Client-facing CLI commands are not versioned in the same way as the API, but are user-facing component systems. The two major ways a user interacts with a CLI are through a command or flag, which is referred to in this context as CLI elements.
All CLI elements default to API tier 1 unless otherwise noted or the CLI depends on a lower tier API.
Element | API tier | |
---|---|---|
Generally available (GA) | Flags and commands | Tier 1 |
Technology Preview | Flags and commands | Tier 3 |
Developer Preview | Flags and commands | Tier 4 |
1.3.3. Deprecating an entire component
The duration and schedule for deprecating an entire component maps directly to the duration associated with the highest API tier of an API exposed by that component. For example, a component that surfaced APIs with tier 1 and 2 could not be removed until the tier 1 deprecation schedule was met.
API tier | Duration |
---|---|
Tier 1 | Stable within a major release. They may be deprecated within a major release, but they will not be removed until a subsequent major release. |
Tier 2 | 9 months or 3 releases from the announcement of deprecation, whichever is longer. |
Tier 3 | See the component-specific schedule. |
Tier 4 | None. No compatibility is guaranteed. |
Chapter 2. Understanding API compatibility guidelines
Follow the compatibility guidelines to understand the APIs enabled for MicroShift.
This guidance does not cover layered MicroShift offerings.
2.1. API compatibility guidelines
Red Hat recommends that application developers adopt the following principles in order to improve compatibility with MicroShift:
- Use APIs and components with support tiers that match the application’s need.
- Build applications using the published client libraries where possible.
- Applications are only guaranteed to run correctly if they execute in an environment that is as new as the environment it was built to execute against. An application that was built for MicroShift 4.14 is not guaranteed to function properly on MicroShift 4.13.
- Do not design applications that rely on configuration files provided by system packages or other components. These files can change between versions unless the upstream community is explicitly committed to preserving them. Where appropriate, depend on any Red Hat provided interface abstraction over those configuration files in order to maintain forward compatibility. Direct file system modification of configuration files is discouraged, and users are strongly encouraged to integrate with an Operator provided API where available to avoid dual-writer conflicts.
-
Do not depend on API fields prefixed with
unsupported<FieldName>
or annotations that are not explicitly mentioned in product documentation. - Do not depend on components with shorter compatibility guarantees than your application.
- Do not perform direct storage operations on the etcd server. All etcd access must be performed via the api-server or through documented backup and restore procedures.
Red Hat recommends that application developers follow the compatibility guidelines defined by Red Hat Enterprise Linux (RHEL). MicroShift strongly recommends the following guidelines when building an application or hosting an application on the platform:
- Do not depend on a specific Linux kernel or MicroShift version.
-
Avoid reading from
proc
,sys
, anddebug
file systems, or any other pseudo file system. -
Avoid using
ioctls
to directly interact with hardware. -
Avoid direct interaction with
cgroups
in order to not conflict with MicroShift host-agents that provide the container execution environment.
During the lifecycle of a release, Red Hat makes commercially reasonable efforts to maintain API and application operating environment (AOE) compatibility across all minor releases and z-stream releases. If necessary, Red Hat might make exceptions to this compatibility goal for critical impact security or other significant issues.
2.2. API compatibility exceptions
The following are exceptions to compatibility in MicroShift:
Functional defaults between an upgraded cluster and a new installation
No assurances are made at this time that a new installation of a product minor release will have the same functional defaults as a version of the product that was installed with a prior minor release and upgraded to the equivalent version. For example, future versions of the product may provision cloud infrastructure with different defaults than prior minor versions. In addition, different default security choices may be made in future versions of the product than those made in past versions of the product. Past versions of the product will forward upgrade, but preserve legacy choices where appropriate specifically to maintain backwards compatibility.
Usage of API fields that have the prefix "unsupported” or undocumented annotations
Select APIs in the product expose fields with the prefix unsupported<FieldName>
. No assurances are made at this time that usage of this field is supported across releases or within a release. Product support can request a customer to specify a value in this field when debugging specific problems, but its usage is not supported outside of that interaction. Usage of annotations on objects that are not explicitly documented are not assured support across minor releases.
API availability per product installation topology
The OpenShift distribution will continue to evolve its supported installation topology, and not all APIs in one install topology will necessarily be included in another. For example, certain topologies may restrict read/write access to particular APIs if they are in conflict with the product installation topology or not include a particular API at all if not pertinent to that topology. APIs that exist in a given topology will be supported in accordance with the compatibility tiers defined above.
2.3. API compatibility common terminology
2.3.1. Application Programming Interface (API)
An API is a public interface implemented by a software program that enables it to interact with other software. In MicroShift, the API is served from a centralized API server and is used as the hub for all system interaction.
2.3.2. Application Operating Environment (AOE)
An AOE is the integrated environment that executes the end-user application program. The AOE is a containerized environment that provides isolation from the host operating system (OS). At a minimum, AOE allows the application to run in an isolated manner from the host OS libraries and binaries, but still share the same OS kernel as all other containers on the host. The AOE is enforced at runtime and it describes the interface between an application and its operating environment. It includes intersection points between the platform, operating system and environment, with the user application including projection of downward API, DNS, resource accounting, device access, platform workload identity, isolation among containers, isolation between containers and host OS.
The AOE does not include components that might vary by installation, such as Container Network Interface (CNI) plugin selection or extensions to the product such as admission hooks. Components that integrate with the cluster at a level below the container environment might be subjected to additional variation between versions.
2.3.3. Compatibility in a virtualized environment
Virtual environments emulate bare-metal environments such that unprivileged applications that run on bare-metal environments will run, unmodified, in corresponding virtual environments. Virtual environments present simplified abstracted views of physical resources, so some differences might exist.
2.3.4. Compatibility in a cloud environment
MicroShift might choose to offer integration points with a hosting cloud environment via cloud provider specific integrations. The compatibility of these integration points are specific to the guarantee provided by the native cloud vendor and its intersection with the MicroShift compatibility window. Where MicroShift provides an integration with a cloud environment natively as part of the default installation, Red Hat develops against stable cloud API endpoints to provide commercially reasonable support with forward looking compatibility that includes stable deprecation policies. Example areas of integration between the cloud provider and MicroShift include, but are not limited to, dynamic volume provisioning, service load balancer integration, pod workload identity, dynamic management of compute, and infrastructure provisioned as part of initial installation.
2.3.5. Major, minor, and z-stream releases
A Red Hat major release represents a significant step in the development of a product. Minor releases appear more frequently within the scope of a major release and represent deprecation boundaries that might impact future application compatibility. A z-stream release is an update to a minor release which provides a stream of continuous fixes to an associated minor release. API and AOE compatibility is never broken in a z-stream release except when this policy is explicitly overridden in order to respond to an unforeseen security impact.
For example, in the release 4.13.2:
- 4 is the major release version
- 13 is the minor release version
- 2 is the z-stream release version
2.3.6. Extended user support (EUS)
A minor release in an MicroShift major release that has an extended support window for critical bug fixes. Users are able to migrate between EUS releases by incrementally adopting minor versions between EUS releases. It is important to note that the deprecation policy is defined across minor releases and not EUS releases. As a result, an EUS user might have to respond to a deprecation when migrating to a future EUS while sequentially upgrading through each minor release.
2.3.7. Developer Preview
An optional product capability that is not officially supported by Red Hat, but is intended to provide a mechanism to explore early phase technology. By default, Developer Preview functionality is opt-in, and subject to removal at any time. Enabling a Developer Preview feature might render a cluster unsupportable dependent upon the scope of the feature.
2.3.8. Technology Preview
An optional product capability that provides early access to upcoming product innovations to test functionality and provide feedback during the development process. The feature is not fully supported, might not be functionally complete, and is not intended for production use. Usage of a Technology Preview function requires explicit opt-in. Learn more about the Technology Preview Features Support Scope.
Chapter 3. API index
API | API group |
---|---|
apiregistration.k8s.io/v1 | |
v1 | |
certificates.k8s.io/v1 | |
rbac.authorization.k8s.io/v1 | |
rbac.authorization.k8s.io/v1 | |
v1 | |
v1 | |
apps/v1 | |
batch/v1 | |
storage.k8s.io/v1 | |
storage.k8s.io/v1 | |
storage.k8s.io/v1 | |
apiextensions.k8s.io/v1 | |
apps/v1 | |
apps/v1 | |
v1 | |
discovery.k8s.io/v1 | |
v1 | |
events.k8s.io/v1 | |
policy/v1 | |
flowcontrol.apiserver.k8s.io/v1beta3 | |
autoscaling/v2 | |
networking.k8s.io/v1 | |
networking.k8s.io/v1 | |
batch/v1 | |
coordination.k8s.io/v1 | |
v1 | |
authorization.k8s.io/v1 | |
topolvm.io/v1 | |
admissionregistration.k8s.io/v1 | |
v1 | |
networking.k8s.io/v1 | |
v1 | |
v1 | |
v1 | |
v1 | |
policy/v1 | |
v1 | |
scheduling.k8s.io/v1 | |
flowcontrol.apiserver.k8s.io/v1beta3 | |
security.internal.openshift.io/v1 | |
apps/v1 | |
v1 | |
v1 | |
rbac.authorization.k8s.io/v1 | |
rbac.authorization.k8s.io/v1 | |
route.openshift.io/v1 | |
node.k8s.io/v1 | |
autoscaling/v1 | |
v1 | |
security.openshift.io/v1 | |
authorization.k8s.io/v1 | |
authorization.k8s.io/v1 | |
v1 | |
v1 | |
apps/v1 | |
storage.k8s.io/v1 | |
migration.k8s.io/v1alpha1 | |
authorization.k8s.io/v1 | |
authentication.k8s.io/v1 | |
authentication.k8s.io/v1 | |
admissionregistration.k8s.io/v1 | |
storage.k8s.io/v1 | |
snapshot.storage.k8s.io/v1 | |
snapshot.storage.k8s.io/v1 | |
snapshot.storage.k8s.io/v1 |
Chapter 4. API object reference
4.1. Common object reference
4.1.1. io.k8s.api.admissionregistration.v1.MutatingWebhookConfigurationList schema
- Description
- MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.
- Type
-
object
- Required
-
items
-
Schema
Property | Type | Description |
---|---|---|
|
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
| List of MutatingWebhookConfiguration. | |
|
| Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
4.1.2. io.k8s.api.admissionregistration.v1.ValidatingWebhookConfigurationList schema
- Description
- ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.
- Type
-
object
- Required
-
items
-
Schema
Property | Type | Description |
---|---|---|
|
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
| List of ValidatingWebhookConfiguration. | |
|
| Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
4.1.3. io.k8s.api.apps.v1.ControllerRevisionList schema
- Description
- ControllerRevisionList is a resource containing a list of ControllerRevision objects.
- Type
-
object
- Required
-
items
-
Schema
Property | Type | Description |
---|---|---|
|
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
| Items is the list of ControllerRevisions | |
|
| Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
4.1.4. io.k8s.api.apps.v1.DaemonSetList schema
- Description
- DaemonSetList is a collection of daemon sets.
- Type
-
object
- Required
-
items
-
Schema
Property | Type | Description |
---|---|---|
|
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
| A list of daemon sets. | |
|
| Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
4.1.5. io.k8s.api.apps.v1.DeploymentList schema
- Description
- DeploymentList is a list of Deployments.
- Type
-
object
- Required
-
items
-
Schema
Property | Type | Description |
---|---|---|
|
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
| Items is the list of Deployments. | |
|
| Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| Standard list metadata. |
4.1.6. io.k8s.api.apps.v1.ReplicaSetList schema
- Description
- ReplicaSetList is a collection of ReplicaSets.
- Type
-
object
- Required
-
items
-
Schema
Property | Type | Description |
---|---|---|
|
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
| List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller | |
|
| Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
4.1.7. io.k8s.api.apps.v1.StatefulSetList schema
- Description
- StatefulSetList is a collection of StatefulSets.
- Type
-
object
- Required
-
items
-
Schema
Property | Type | Description |
---|---|---|
|
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
| Items is the list of stateful sets. | |
|
| Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| Standard list’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
4.1.8. io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerList schema
- Description
- HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.
- Type
-
object
- Required
-
items
-
Schema
Property | Type | Description |
---|---|---|
|
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
| items is the list of horizontal pod autoscaler objects. | |
|
| Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| metadata is the standard list metadata. |
4.1.9. io.k8s.api.batch.v1.CronJobList schema
- Description
- CronJobList is a collection of cron jobs.
- Type
-
object
- Required
-
items
-
Schema
Property | Type | Description |
---|---|---|
|
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
| items is the list of CronJobs. | |
|
| Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
4.1.10. io.k8s.api.batch.v1.JobList schema
- Description
- JobList is a collection of jobs.
- Type
-
object
- Required
-
items
-
Schema
Property | Type | Description |
---|---|---|
|
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
| items is the list of Jobs. | |
|
| Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
4.1.11. io.k8s.api.certificates.v1.CertificateSigningRequestList schema
- Description
- CertificateSigningRequestList is a collection of CertificateSigningRequest objects
- Type
-
object
- Required
-
items
-
Schema
Property | Type | Description |
---|---|---|
|
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
| items is a collection of CertificateSigningRequest objects | |
|
| Kind is a string value representing the REST r |