1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/create-wif-cluster-cli.adoc

83 lines
3.9 KiB
Plaintext

// Module included in the following assemblies:
//
// * osd_gcp_clusters/osd-creating-a-cluster-on-gcp-with-workload-identity-federation.adoc
:_mod-docs-content-type: PROCEDURE
[id="create-wif-cluster-cli_{context}"]
= Creating a Workload Identity Federation cluster using the OCM CLI
[role="_abstract"]
You can create an {product-title} on {GCP} cluster with Workload Identity Federation (WIF) using the OpenShift Cluster Manager CLI (`ocm`) in interactive or non-interactive mode.
[NOTE]
====
Migrating an existing non-WIF cluster to a WIF configuration is not supported. This feature can only be enabled during new cluster creation.
====
.Procedure
You can create a WIF cluster using the `interactive` mode or the `non-interactive` mode.
In `interactive` mode, cluster attributes are displayed automatically as prompts during the creation of the cluster. You enter the values for those prompts based on specified requirements in the fields provided.
In `non-interactive` mode, you specify the values for specific parameters within the command.
* Based on your mode preference, run one of the following commands to create an {product-title} cluster on {gcp-short} with WIF configuration:
** Create a cluster in interactive mode by running the following command:
+
[source,terminal]
----
$ ocm create cluster --interactive <1>
----
<1> `interactive` mode enables you to specify configuration options at the interactive prompts.
+
** Create a cluster in non-interactive mode by running the following command:
+
[NOTE]
====
The following example is made up optional and required parameters and may differ from your `non-interactive` mode command. Parameters not identified as optional are required. For additional details about these and other parameters, run the `ocm create cluster --help flag` command in you terminal window.
====
+
[source,terminal]
----
$ ocm create cluster <cluster_name> \ <1>
--provider=gcp \ <2>
--ccs=true \ <3>
--wif-config <wif_name> \ <4>
--region <gcp_region> \ <5>
--subscription-type=marketplace-gcp \ <6>
--marketplace-gcp-terms=true \ <7>
--version <version> \ <8>
--multi-az=true \ <9>
--enable-autoscaling=true \ <10>
--min-replicas=3 \ <11>
--max-replicas=6 \ <12>
--secure-boot-for-shielded-vms=true <13>
--channel-group <channel_group_name> <14>
----
<1> Replace `<cluster_name>` with a name for your cluster.
<2> Set value to `gcp`.
<3> Set value to `true`.
<4> Replace `<wif_name>` with the name of your WIF configuration.
<5> Replace `<gcp_region>` with the {GCP} region where the new cluster will be deployed.
<6> Optional: The subscription billing model for the cluster.
<7> Optional: If you provided a value of `marketplace-gcp` for the `subscription-type` parameter, `marketplace-gcp-terms` must be equal to `true`.
<8> Optional: The desired {product-title} version.
<9> Optional: Deploy to multiple data centers.
<10> Optional: Enable autoscaling of compute nodes.
<11> Optional: Minimum number of compute nodes.
<12> Optional: Maximum number of compute nodes.
<13> Optional: Secure Boot enables the use of Shielded VMs in the {gcp-full}.
<14> Optional: Replace `<channel_group_name>` with the name of the channel group you want to assign the cluster to. Channel group options include `stable` and `eus`.
[IMPORTANT]
====
If an {product-title} version is specified, the version must also be supported by the assigned WIF configuration. If a version is specified that is not supported by the assigned WIF configuration, cluster creation will fail. If this occurs, update the assigned WIF configuration to the desired version or create a new WIF configuration with the desired version in the --version <osd_version> field.
====
[IMPORTANT]
====
If your cluster deployment fails during installation, certain resources created during the installation process are not automatically removed from your {GCP} account. To remove these resources from your {gcp-short} account, you must delete the failed cluster.
====