Advanced OADP features and functionalities
A source cluster might offer multiple versions of an API, where one of these versions is the preferred API version. For example, a source cluster with an API named might be available in the example.com/v1
and example.com/v1beta2
API groups.
If you use Velero to back up and restore such a source cluster, Velero backs up only the version of that resource that uses the preferred version of its Kubernetes API.
To return to the above example, if example.com/v1
is the preferred API, then Velero only backs up the version of a resource that uses example.com/v1
. Moreover, the target cluster needs to have example.com/v1
registered in its set of available API resources in order for Velero to restore the resource on the target cluster.
Therefore, you need to generate a list of the Kubernetes API group versions on your target cluster to be sure the preferred API version is registered in its set of available API resources.
Procedure
- Enter the following command:
For example, a source cluster with an API named Example
might be available in the and example.com/v1beta2
API groups, with example.com/v1
being the preferred API.
Without the Enable API Group Versions feature enabled, Velero backs up only the preferred API group version for Example
, which is example.com/v1
. With the feature enabled, Velero also backs up example.com/v1beta2
.
When the Enable API Group Versions feature is enabled on the destination cluster, Velero selects the version to restore on the basis of the order of priority of API group versions.
Velero uses the following algorithm to assign priorities to API versions, with 1
as the top priority:
Preferred version of the source_ cluster
Common non-preferred supported version with the highest Kubernetes version priority
Additional resources
You can use Velero’s Enable API Group Versions feature to back up all Kubernetes API group versions that are supported on a cluster, not only the preferred one.
Enable API Group Versions is still in beta. |
- Configure the feature flag:
apiVersion: oadp.openshift.io/vialpha1
...
spec:
configuration:
velero:
Additional resources