1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-06 06:46:26 +01:00
Files
openshift-docs/modules/hcp-virt-create-hc-cli.adoc
2024-08-29 19:55:27 +00:00

77 lines
2.8 KiB
Plaintext

// Module included in the following assemblies:
//
// * hosted_control_planes/hcp-deploy-disconnected.adoc
:_mod-docs-content-type: PROCEDURE
[id="hcp-virt-create-hc-cli_{context}"]
= Creating a hosted cluster with the KubeVirt platform by using the CLI
To create a hosted cluster, you can use the hosted control plane command line interface, `hcp`.
.Procedure
. Enter the following command:
+
[source,terminal]
----
$ hcp create cluster kubevirt \
--name <hosted-cluster-name> \ <1>
--node-pool-replicas <worker-count> \ <2>
--pull-secret <path-to-pull-secret> \ <3>
--memory <value-for-memory> \ <4>
--cores <value-for-cpu> \ <5>
--etcd-storage-class=<etcd-storage-class> <6>
----
+
<1> Specify the name of your hosted cluster, for instance, `example`.
<2> Specify the worker count, for example, `2`.
<3> Specify the path to your pull secret, for example, `/user/name/pullsecret`.
<4> Specify a value for memory, for example, `6Gi`.
<5> Specify a value for CPU, for example, `2`.
<6> Specify the etcd storage class name, for example, `lvm-storageclass`.
+
[NOTE]
====
You can use the `--release-image` flag to set up the hosted cluster with a specific {product-title} release.
====
+
A default node pool is created for the cluster with two virtual machine worker replicas according to the `--node-pool-replicas` flag.
. After a few moments, verify that the hosted control plane pods are running by entering the following command:
+
[source,terminal]
----
$ oc -n clusters-<hosted-cluster-name> get pods
----
+
.Example output
[source,terminal]
----
NAME READY STATUS RESTARTS AGE
capi-provider-5cc7b74f47-n5gkr 1/1 Running 0 3m
catalog-operator-5f799567b7-fd6jw 2/2 Running 0 69s
certified-operators-catalog-784b9899f9-mrp6p 1/1 Running 0 66s
cluster-api-6bbc867966-l4dwl 1/1 Running 0 66s
.
.
.
redhat-operators-catalog-9d5fd4d44-z8qqk 1/1 Running 0 66s
----
+
A hosted cluster that has worker nodes that are backed by KubeVirt virtual machines typically takes 10-15 minutes to be fully provisioned.
. To check the status of the hosted cluster, see the corresponding `HostedCluster` resource by entering the following command:
+
[source,terminal]
----
$ oc get --namespace clusters hostedclusters
----
+
See the following example output, which illustrates a fully provisioned `HostedCluster` object:
+
----
NAMESPACE NAME VERSION KUBECONFIG PROGRESS AVAILABLE PROGRESSING MESSAGE
clusters example 4.x.0 example-admin-kubeconfig Completed True False The hosted control plane is available
----
+
Replace `4.x.0` with the supported {product-title} version that you want to use.