Cluster capabilities
Cluster administrators can use the cluster capabilities to select or deselect one or more optional components prior to installation and also enable a cluster capability anytime post installation.
If cluster capability has been enabled before, it cannot be disabled. |
Viewing the cluster capabilities
As a cluster administrator, you can view the capabilities by using the clusterversion
resource status.
Prerequisites
- You have installed the OpenShift CLI (
oc
).
Procedure
To view the status of the cluster capabilities, run the following command:
$ oc get clusterversion version -o jsonpath='{.spec.capabilities}{"\n"}{.status.capabilities}{"\n"}'
Example output
{"additionalEnabledCapabilities":["openshift-samples"],"baselineCapabilitySet":"None"}
{"enabledCapabilities":["openshift-samples"],"knownCapabilities":["baremetal","marketplace","openshift-samples"]}
Enabling the cluster capabilities by setting baseline capability set
As a cluster administrator, you can enable the capabilities by setting baselineCapabilitySet
.
Prerequisites
- You have installed the OpenShift CLI (
oc
).
Procedure
To set the
baselineCapabilitySet
, run the following command:$ oc patch clusterversion version --type merge -p '{"spec":{"capabilities":{"baselineCapabilitySet":"vCurrent"}}}' (1)
1 For baselineCapabilitySet
you can specifyvCurrent
,v4.11
, orNone
.The following table describes the
baselineCapabilitySet
values.Table 1. Cluster capabilities baselineCapabilitySet
values descriptionValue Description vCurrent
Specify when you want to automatically add new capabilities as they become recommended.
v4.11
Specify when you want the capabilities defined in OKD 4.11 and not automatically enable capabilities, which might be introduced in later versions.
None
Specify when the other sets are too large, and you do not need any capabilities or want to fine-tune via
additionalEnabledCapabilities
.
Additional resources
The following are the capabilities defined in v4.11
:
Enabling the cluster capabilities by setting additional enabled capabilities
As a cluster administrator, you can enable the cluster capabilities by setting additionalEnabledCapabilities
.
Prerequisites
- You have installed the OpenShift CLI (
oc
).
Procedure
View the additional enabled capabilities by running the following command:
$ oc get clusterversion version -o jsonpath='{.spec.capabilities.additionalEnabledCapabilities}{"\n"}'
Example output
["openshift-samples"]
To set the
additionalEnabledCapabilities
, run the following command:$ oc patch clusterversion/version --type merge -p '{"spec":{"capabilities":{"additionalEnabledCapabilities":["openshift-samples", "marketplace"]}}}'
It is not possible to disable a capability which is already enabled in a cluster. The cluster version Operator (CVO) continues to reconcile the capability which is already enabled in the cluster. |
If you try to disable a capability, then CVO shows the divergent spec:
$ oc get clusterversion version -o jsonpath='{.status.conditions[?(@.type=="ImplicitlyEnabledCapabilities")]}{"\n"}'
Example output
{"lastTransitionTime":"2022-07-22T03:14:35Z","message":"The following capabilities could not be disabled: openshift-samples","reason":"CapabilitiesImplicitlyEnabled","status":"True","type":"ImplicitlyEnabledCapabilities"}
During the cluster upgrades, it is possible that a given capability could be implicitly enabled. If a resource was already running on the cluster before the upgrade, then any capabilities that is part of the resource will be enabled. For example, during a cluster upgrade, a resource that is already running on the cluster has been changed to be part of the |