mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
55 lines
2.6 KiB
Plaintext
55 lines
2.6 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * hosted_control_planes/hcp-deploy/hcp-deploy-bm.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="hcp-bm-hc-mirror_{context}"]
|
|
= Creating a hosted cluster on bare metal by using a mirror registry
|
|
|
|
You can use a mirror registry to create a hosted cluster on bare metal by specifying the `--image-content-sources` flag in the `hcp create cluster` command.
|
|
|
|
.Procedure
|
|
|
|
. Create a YAML file to define Image Content Source Policies (ICSP). See the following example:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
- mirrors:
|
|
- brew.registry.redhat.io
|
|
source: registry.redhat.io
|
|
- mirrors:
|
|
- brew.registry.redhat.io
|
|
source: registry.stage.redhat.io
|
|
- mirrors:
|
|
- brew.registry.redhat.io
|
|
source: registry-proxy.engineering.redhat.com
|
|
----
|
|
|
|
. Save the file as `icsp.yaml`. This file contains your mirror registries.
|
|
|
|
. To create a hosted cluster by using your mirror registries, run the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ hcp create cluster agent \
|
|
--name=<hosted_cluster_name> \// <1>
|
|
--pull-secret=<path_to_pull_secret> \// <2>
|
|
--agent-namespace=<hosted_control_plane_namespace> \// <3>
|
|
--base-domain=<basedomain> \// <4>
|
|
--api-server-address=api.<hosted_cluster_name>.<basedomain> \// <5>
|
|
--image-content-sources icsp.yaml \// <6>
|
|
--ssh-key <path_to_ssh_key> \// <7>
|
|
--namespace <hosted_cluster_namespace> \// <8>
|
|
--release-image=quay.io/openshift-release-dev/ocp-release:<ocp_release_image> <9>
|
|
----
|
|
|
|
+
|
|
<1> Specify the name of your hosted cluster, for instance, `example`.
|
|
<2> Specify the path to your pull secret, for example, `/user/name/pullsecret`.
|
|
<3> Specify your hosted control plane namespace, for example, `clusters-example`. Ensure that agents are available in this namespace by using the `oc get agent -n <hosted-control-plane-namespace>` command.
|
|
<4> Specify your base domain, for example, `krnl.es`.
|
|
<5> The `--api-server-address` flag defines the IP address that is used for the Kubernetes API communication in the hosted cluster. If you do not set the `--api-server-address` flag, you must log in to connect to the management cluster.
|
|
<6> Specify the `icsp.yaml` file that defines ICSP and your mirror registries.
|
|
<7> Specify the path to your SSH public key. The default file path is `~/.ssh/id_rsa.pub`.
|
|
<8> Specify your hosted cluster namespace.
|
|
<9> Specify the supported {product-title} version that you want to use, for example, `4.21.0-multi`. If you are using a disconnected environment, replace `<ocp_release_image>` with the digest image. To extract the {product-title} release image digest, see "Extracting the {product-title} release image digest". |