Installing the hosted control planes command-line interface
The hosted control planes command-line interface, hcp, is a tool that you can use to get started with hosted control planes. For Day 2 operations, such as management and configuration, use GitOps or your own automation tool.
Installing the hosted control planes command-line interface from the terminal
You can install the hosted control planes command-line interface (CLI), hcp, from the terminal.
-
On an OpenShift Container Platform cluster, you have installed multicluster engine for Kubernetes Operator 2.5 or later. The multicluster engine Operator is automatically installed when you install Red Hat Advanced Cluster Management. You can also install multicluster engine Operator without Red Hat Advanced Management as an Operator from the OpenShift Container Platform software catalog.
-
Get the URL to download the
hcpbinary by running the following command:$ oc get ConsoleCLIDownload hcp-cli-download -o json | jq -r ".spec" -
Download the
hcpbinary by running the following command:$ wget <hcp_cli_download_url>- Replace
hcp_cli_download_urlwith the URL that you obtained from the previous step.
- Replace
-
Unpack the downloaded archive by running the following command:
$ tar xvzf hcp.tar.gz -
Make the
hcpbinary file executable by running the following command:$ chmod +x hcp -
Move the
hcpbinary file to a directory in your path by running the following command:$ sudo mv hcp /usr/local/bin/.
Note
If you download the CLI on a Mac computer, you might see a warning about the hcp binary file. You need to adjust your security settings to allow the binary file to be run.
-
Verify that you see the list of available parameters by running the following command:
$ hcp create cluster <platform> --help- You can use the
hcp create clustercommand to create and manage hosted clusters. The supported platforms areaws,agent, andkubevirt.
- You can use the
Installing the hosted control planes command-line interface by using the web console
You can install the hosted control planes command-line interface (CLI), hcp, by using the OpenShift Container Platform web console.
-
On an OpenShift Container Platform cluster, you have installed multicluster engine for Kubernetes Operator 2.5 or later. The multicluster engine Operator is automatically installed when you install Red Hat Advanced Cluster Management. You can also install multicluster engine Operator without Red Hat Advanced Management as an Operator from the OpenShift Container Platform software catalog.
-
From the OpenShift Container Platform web console, click the Help icon → Command Line Tools.
-
Click Download hcp CLI for your platform.
-
Unpack the downloaded archive by running the following command:
$ tar xvzf hcp.tar.gz -
Run the following command to make the binary file executable:
$ chmod +x hcp -
Run the following command to move the binary file to a directory in your path:
$ sudo mv hcp /usr/local/bin/.
Note
If you download the CLI on a Mac computer, you might see a warning about the hcp binary file. You need to adjust your security settings to allow the binary file to be run.
-
Verify that you see the list of available parameters by running the following command:
$ hcp create cluster <platform> --help- You can use the
hcp create clustercommand to create and manage hosted clusters. The supported platforms areaws,agent, andkubevirt.
- You can use the
Installing the hosted control planes command-line interface by using the content gateway
You can install the hosted control planes command-line interface (CLI), hcp, by using the content gateway.
-
On an OpenShift Container Platform cluster, you have installed multicluster engine for Kubernetes Operator 2.7 or later. The multicluster engine Operator is automatically installed when you install Red Hat Advanced Cluster Management. You can also install multicluster engine Operator without Red Hat Advanced Management as an Operator from OpenShift Container Platform OperatorHub.
-
Navigate to the content gateway and download the
hcpbinary. -
Unpack the downloaded archive by running the following command:
$ tar xvzf hcp.tar.gz -
Make the
hcpbinary file executable by running the following command:$ chmod +x hcp -
Move the
hcpbinary file to a directory in your path by running the following command:$ sudo mv hcp /usr/local/bin/.
Note
If you download the CLI on a Mac computer, you might see a warning about the hcp binary file. You need to adjust your security settings to allow the binary file to be run.
-
Verify that you see the list of available parameters by running the following command:
$ hcp create cluster <platform> --help- You can use the
hcp create clustercommand to create and manage hosted clusters. The supported platforms areaws,agent, andkubevirt.
- You can use the