You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To stop using the Cluster API to automate the management of infrastructure resources on your {product-title} cluster, convert any Cluster API resources on your cluster to equivalent Machine API resources.
10
+
9
11
:FeatureName: Managing machines with the Cluster API
10
12
include::snippets/technology-preview.adoc[]
11
13
12
-
//Placeholder assembly, commented out in the topic map.
13
-
//how to disable, clean up, verify, and reenable
14
+
//Migrating Cluster API resources to Machine API resources
* xref:../../machine_management/cluster_api_machine_management/cluster-api-getting-started.adoc#capi-mapi-migration-overview_cluster-api-getting-started[Migrating Machine API resources to Cluster API resources]
The Machine API and Cluster API are distinct API groups that have similar resources.
10
+
You can use these API groups to automate the management of infrastructure resources on your {product-title} cluster.
11
+
9
12
:FeatureName: Managing machines with the Cluster API
10
13
include::snippets/technology-preview.adoc[]
11
14
12
-
For the Cluster API Technology Preview, you must manually create some of the primary resources that the Cluster API requires.
15
+
When you install a standard {product-title} cluster that has three control plane nodes, three compute nodes, and uses the default configuration options, the installation program provisions the following infrastructure resources in the `openshift-machine-api` namespace
16
+
17
+
* One control plane machine set that manages three control plane machines.
18
+
* One or more compute machine sets that manage three compute machines.
19
+
* One machine health check that manages spot instances.
20
+
21
+
When you install a cluster that supports managing infrastructure resources with the Cluster API, the installation program provisions the following resources in the `openshift-cluster-api` namespace:
22
+
23
+
* One cluster resource.
24
+
* One provider-specific infrastructure cluster resource.
25
+
26
+
On clusters that support migrating Machine API resources to Cluster API resources, a two-way synchronization controller creates these primary resources automatically.
27
+
For more information, see xref:../../machine_management/cluster_api_machine_management/cluster-api-getting-started.adoc#capi-mapi-migration-overview_cluster-api-getting-started[Migrating Machine API resources to Cluster API resources].
13
28
14
29
[id="creating-primary-resources_{context}"]
15
30
== Creating the Cluster API primary resources
16
31
17
-
You can create the Cluster API primary resources manually by creating YAML manifest files and applying them with the {oc-first}.
32
+
For clusters that do not support migrating Machine API resources to Cluster API resources, you must manually create the following Cluster API resources in the `openshift-cluster-api` namespace:
33
+
34
+
* One or more machine templates that correspond to compute machine sets.
35
+
* One or more compute machine sets that manage three compute machines.
* xref:../../machine_management/cluster_api_machine_management/cluster_api_provider_configurations/cluster-api-config-options-azure.adoc#capi-yaml-machine-set-azure_cluster-api-config-options-azure[Sample YAML for a Cluster API compute machine set resource on {azure-full}]
37
55
* xref:../../machine_management/cluster_api_machine_management/cluster_api_provider_configurations/cluster-api-config-options-rhosp.adoc#capi-yaml-machine-set-rhosp_cluster-api-config-options-rhosp[Sample YAML for a Cluster API compute machine set resource on {rh-openstack}]
38
56
* xref:../../machine_management/cluster_api_machine_management/cluster_api_provider_configurations/cluster-api-config-options-vsphere.adoc#capi-yaml-machine-set-vsphere_cluster-api-config-options-vsphere[Sample YAML for a Cluster API compute machine set resource on {vmw-full}]
39
-
* xref:../../machine_management/cluster_api_machine_management/cluster_api_provider_configurations/cluster-api-config-options-bare-metal.adoc#capi-yaml-machine-set-bare-metal_cluster-api-config-options-bare-metal[Sample YAML for a Cluster API compute machine set resource on bare metal]
57
+
* xref:../../machine_management/cluster_api_machine_management/cluster_api_provider_configurations/cluster-api-config-options-bare-metal.adoc#capi-yaml-machine-set-bare-metal_cluster-api-config-options-bare-metal[Sample YAML for a Cluster API compute machine set resource on bare metal]
58
+
59
+
//Migrating Machine API resources to Cluster API resources
* xref:../../machine_management/cluster_api_machine_management/cluster-api-disabling.adoc#mapi-capi-migration-overview_cluster-api-disabling[Migrating Cluster API resources to Machine API resources]
= Migrating Machine API resources to Cluster API resources
8
+
9
+
On clusters that support migrating Machine API resources to Cluster API resources, a two-way synchronization controller creates the following Cluster API resources in the `openshift-cluster-api` namespace:
10
+
11
+
* One or more machine templates that correspond to compute machine sets.
12
+
* One or more compute machine sets that manage three compute machines.
13
+
* One or more Cluster API compute machines that correspond to each Machine API compute machine.
14
+
15
+
[NOTE]
16
+
====
17
+
The two-way synchronization controller only operates on clusters with the `MachineAPIMigration` feature gate in the `TechPreviewNoUpgrade` feature set enabled.
18
+
====
19
+
20
+
These Cluster API resources correspond to the resources that the installation program provisions in the `openshift-machine-api` namespace for a cluster that uses the default configuration options.
21
+
The Cluster API resources have the same names as their Machine API counterparts and appear in the output of commands, such as `oc get`, that list resources.
22
+
The synchronization controller creates the Cluster API resources in an unprovisioned (`Paused`) state to prevent unintended reconciliation.
23
+
24
+
For supported configurations, you can migrate a Machine API resource to the equivalent Cluster API resource by changing which API it considers authoritative.
25
+
When you migrate a Machine API resources to the Cluster API, you transfer management of the resource to the Cluster API.
26
+
27
+
By migrating a Machine API resource to use the Cluster API, you can verify that everything works as expected before deciding to use the Cluster API in production clusters.
28
+
After migrating a Machine API resource to an equivalent Cluster API resource, you can examine the new resource to verify that the features and configuration match the original Machine API resource.
29
+
30
+
When you change the authoritative API for a compute machine set, any existing compute machines that the compute machine set manages retain their original authoritative API.
31
+
As a result, a compute machine set that manages machines that use different authoritative APIs is a valid and expected occurrence in clusters that support migrating between these API types.
32
+
33
+
When you change the authoritative API for a compute machine, the instance on the underlying infrastructure that backs the machine is not recreated or reprovisioned.
34
+
In-place changes, such as modifying labels, tags, taints, or annotations, are the only changes that the API group can make to the underlying instance that backs the machine.
35
+
36
+
[NOTE]
37
+
====
38
+
You can only migrate some resources on supported infrastructure types.
= Deploying Cluster API compute machines by using a Machine API compute machine set
8
+
9
+
You can configure a Machine API compute machine set to deploy Cluster API compute machines.
10
+
With this process, you can test the Cluster API compute machine creation workflow without creating and scaling a Cluster API compute machine set.
11
+
12
+
A Machine API compute machine set with this configuration creates nonauthoritative Machine API compute machines that use the Cluster API as authoritative.
13
+
The two-way synchronization controller then creates corresponding authoritative Cluster API machines that provision on the underlying infrastructure.
14
+
15
+
:FeatureName: Deploying Cluster API compute machines by using a Machine API compute machine set
16
+
include::snippets/technology-preview.adoc[]
17
+
18
+
.Prerequisites
19
+
20
+
* You have deployed an {product-title} cluster on a supported infrastructure type.
21
+
22
+
* You have enabled the use of the Cluster API.
23
+
24
+
* You have enabled the `MachineAPIMigration` feature gate in the `TechPreviewNoUpgrade` feature set.
25
+
26
+
* You have access to the cluster using an account with `cluster-admin` permissions.
27
+
28
+
* You have installed the {oc-first}.
29
+
30
+
.Procedure
31
+
32
+
. List the Machine API compute machine sets in your cluster by running the following command:
33
+
+
34
+
[source,terminal,subs="attributes+"]
35
+
----
36
+
$ oc get machineset.machine.openshift.io -n openshift-machine-api
37
+
----
38
+
39
+
. Edit the resource specification by running the following command:
. To verify that a machine created by the updated machine set has the correct configuration, examine the `status.authoritativeAPI` field in the CR for one of the new machines by running the following command:
= Migrating Cluster API resources to Machine API resources
8
+
9
+
On clusters that support migrating between Machine API and Cluster API resources, the two-way synchronization controller supports converting a Cluster API resource to a Machine API resource.
10
+
11
+
[NOTE]
12
+
====
13
+
The two-way synchronization controller only operates on clusters with the `MachineAPIMigration` feature gate in the `TechPreviewNoUpgrade` feature set enabled.
14
+
====
15
+
16
+
You can migrate resources that you originally migrated from the Machine API to the Cluster API, or resources that you created as Cluster API resources initially.
17
+
Migrating an original Machine API resource to a Cluster API resource and then migrating it back provides an opportunity to verify that the migration process works as expected.
18
+
19
+
[NOTE]
20
+
====
21
+
You can only migrate some resources on supported infrastructure types.
0 commit comments