This is a cache of https://docs.okd.io/latest/hosted_control_planes/hcp-prepare/hcp-cli.html. It is a snapshot of the page at 2024-11-23T19:00:11.754+0000.
Installing the hosted control plane command-line interface - Preparing to deploy hosted control planes | Hosted control planes | OKD 4
×

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.

Procedure
  1. Get the URL to download the hcp binary by running the following command:

    $ oc get ConsolecliDownload hcp-cli-download -o json | jq -r ".spec"
  2. Download the hcp binary by running the following command:

    $ wget <hcp_cli_download_url> (1)
    1 Replace hcp_cli_download_url with the URL that you obtained from the previous step.
  3. Unpack the downloaded archive by running the following command:

    $ tar xvzf hcp.tar.gz
  4. Make the hcp binary file executable by running the following command:

    $ chmod +x hcp
  5. Move the hcp binary file to a directory in your path by running the following command:

    $ sudo mv hcp /usr/local/bin/.

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.

Verification
  • Verify that you see the list of available parameters by running the following command:

    $ hcp create cluster <platform> --help (1)
    1 You can use the hcp create cluster command to create and manage hosted clusters. The supported platforms are aws, agent, and kubevirt.

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 OKD web console.

Procedure
  1. From the OKD web console, click the Help iconCommand Line Tools.

  2. click Download hcp cli for your platform.

  3. Unpack the downloaded archive by running the following command:

    $ tar xvzf hcp.tar.gz
  4. Run the following command to make the binary file executable:

    $ chmod +x hcp
  5. Run the following command to move the binary file to a directory in your path:

    $ sudo mv hcp /usr/local/bin/.

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.

Verification
  • Verify that you see the list of available parameters by running the following command:

    $ hcp create cluster <platform> --help (1)
    1 You can use the hcp create cluster command to create and manage hosted clusters. The supported platforms are aws, agent, and kubevirt.

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.

Procedure
  1. Navigate to the content gateway and download the hcp binary.

  2. Unpack the downloaded archive by running the following command:

    $ tar xvzf hcp.tar.gz
  3. Make the hcp binary file executable by running the following command:

    $ chmod +x hcp
  4. Move the hcp binary file to a directory in your path by running the following command:

    $ sudo mv hcp /usr/local/bin/.

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.

Verification
  • Verify that you see the list of available parameters by running the following command:

    $ hcp create cluster <platform> --help (1)
    1 You can use the hcp create cluster command to create and manage hosted clusters. The supported platforms are aws, agent, and kubevirt.