7.4. Creating a cluster on bare metal


Important: The bare metal cluster function is a technology preview,and should not be used in production environments.

You can use the Red Hat Advanced Cluster Management for Kubernetes console to create a Red Hat OpenShift Container Platform cluster in a bare metal environment.

注意

The options for bare metal in the console are a technology preview only, and are hidden by a feature flag by default. See the instructions for enabling the feature flag in the Prerequisites section.

7.4.1. Prerequisites

You need the following prerequisites before creating a cluster in a bare metal environment:

  • A deployed Red Hat Advanced Cluster Management for Kubernetes hub cluster on OpenShift Container Platform version 4.5, or later.
  • Internet access for your Red Hat Advanced Cluster Management for Kubernetes hub cluster so it can create the Kubernetes cluster in the bare metal environment
  • Bare metal provider connection; see Creating a provider connection for bare metal for more information
  • Login credentials for your bare metal environment, which include user name, password, and Baseboard Management Controller Address
  • A Red Hat OpenShift Container Platform image pull secret; see Using image pull secrets
  • Bare metal feature flags that are enabled to view the bare metal options. The bare metal options are hidden by feature flags by default. Complete the following steps to enable the feature flags:

    1. Start the Red Hat OpenShift Container Platform command line interface.
    2. Set the featureFlags_baremetal setting to true for the console-header container by entering the following command:

      oc patch deploy console-header -n <namespace> -p '{"spec":{"template":{"spec":{"containers":[{"name":"console-header","env": [{"name": "featureFlags_baremetal","value":"true"}]}]}}}}'
      Copy to Clipboard Toggle word wrap

      Replace <namespace> with your Red Hat Advanced Cluster Management project namespace.

      After the update, your consoleui CRD should look like the following example:

      spec:
        ...
        template:
          ...
          spec:
            ...
            containers:
            - env:                              # Search for env:
              - name: featureFlags_baremetal
                value: "true"
              ...
      Copy to Clipboard Toggle word wrap
    3. Set the featureFlags_baremetal value to true for the hmc-ui container:

      oc patch -n <namespace> $(oc get deploy -o name | grep consoleui) -p '{"spec":{"template":{"spec":{"containers":[{"name":"hcm-ui","env": [{"name": "featureFlags_baremetal","value":"true"}]}]}}}}'
      Copy to Clipboard Toggle word wrap

      Replace <namespace> with your Red Hat Advanced Cluster Management project namespace.

      Your update should look like the following example:

      spec:
        ...
        template:
          ...
          spec:
            ...
            containers:
            - env:                              # Search for env:
              - name: featureFlags_baremetal
                value: "true"
              ...
      Copy to Clipboard Toggle word wrap
    4. Make sure the console-chart-...-consoleui... and console-header-... pods are running:

      oc -n open-cluster-management get pods
      Copy to Clipboard Toggle word wrap
    5. When the pods are running again, log out of the Red Hat Advanced Cluster Management for Kubernetes console and log back in. The bare metal options are now included in the console.

Note: If you change your cloud provider access key, you must manually update the provisioned cluster access key. For more information, see the known issue, Automatic secret updates for provisioned clusters is not supported.

To create clusters from the Red Hat Advanced Cluster Management for Kubernetes console, complete the following steps:

  1. From the navigation menu, navigate to Automate infrastructure > Clusters.
  2. On the Clusters page, Click Add Cluster.
  3. Select Create a cluster.

    注意

    This procedure is for creating a cluster. If you have an existing cluster that you want to import, see Importing a target managed cluster to the hub cluster for those steps.

  4. Enter a name for your cluster. This name is used in the hostname of the cluster.

    提示

    You can view the yaml content updates as you enter the information in the console by setting the YAML switch to ON.

  5. Select Bare Metal for the infrastructure platform.
  6. Specify a Release image that you want to use for the cluster. This identifies the version of the Red Hat OpenShift Container Platform image that is used to create the cluster. If the version that you want to use is available, you can select the image from the list of images. If the image that you want to use is not a standard image, you can enter the url to the image that you want to use. See Release images for more information about release images.
  7. Select your provider connection from the available connections on the list. If you do not have one configured, or want to configure a new one, select Add provider. See Creating a provider connection for bare metal for more information about creating a provider connection.
  8. Enter the base domain information that you configured in your bare metal environment. If there is already a base domain associated with the selected provider connection, that value is populated in that field. You can change the value by overwriting it. This name is used in the hostname of the cluster.
  9. Select your hosts from the list of hosts that are associated with your provider connection. Select a minimum of three assets that are on the same bridge networks as the hypervisor.
  10. Optional: Configure the cluster networking options.
  11. Optional: Configure a label for the cluster.
  12. Optional: Update the advanced settings, if you want to change the setting for including a configmap.
  13. Click Create. You can view your cluster details after the create and import process is complete.

    注意

    You do not have to run the kubectl command that is provided with the cluster details to import the cluster. When you create the cluster, it is automatically configured under the management of Red Hat Advanced Cluster Management for Kubernetes.

7.4.3. Accessing your cluster

To access a cluster that is managed by Red Hat Advanced Cluster Management for Kubernetes, complete the following steps:

  1. From the Red Hat Advanced Cluster Management for Kubernetes navigation menu, navigate to Automate infrastructure > Clusters.
  2. Select the name of the cluster that you created or want to access. The cluster details are displayed.
  3. Select Reveal credentials to view the user name and password for the cluster. Note these values to use when you log in to the cluster.
  4. Select Console URL to link to the cluster.
  5. Log in to the cluster by using the user ID and password that you found in step 3.
  6. Select the Actions menu for the cluster that you want to access.
  7. Select Launch to cluster.

    提示

    If you already know the log in credentials, you can access the cluster by selecting the Actions menu for the cluster, and selecting Launch to cluster.

7.4.4. Removing a cluster from management

When you remove a Red Hat OpenShift Container Platform cluster from management that was created with Red Hat Advanced Cluster Management for Kubernetes, you can either detach it or destroy it.

Detaching a cluster removes it from management, but does not completely delete it. You can import it again, if you decide that you want to bring it back under management. This is only an option when the cluster is in a Ready state.

Destroying a cluster removes it from management and deletes the components of the cluster. This is permanent, and it cannot be brought back under management after deletion.

  1. From the navigation menu, navigate to Automate infrastructure > Clusters.
  2. Select the option menu beside the cluster that you want to delete.
  3. Select Destroy cluster or Detach cluster.

    提示

    You can detach or destroy multiple clusters by selecting the check boxes of the clusters that you want to detach or destroy. Then select Detach or Destroy.

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat