第 5 章 Creating and modifying bare metal assets

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

Bare metal assets are virtual or physical servers that are configured to run your cloud operations. Red Hat Advanced Cluster Management for Kubernetes connects to a bare metal asset that your administrator creates, and can create clusters on it.

You must create a bare metal asset in Red Hat Advanced Cluster Management for Kubernetes to create a cluster on it. Use the following procedure to create a bare metal asset that can host a cluster that is managed by Red Hat Advanced Cluster Management for Kubernetes.

注意

The bare metal features are only provided as a technology preview. The bare metal options are hidden by feature flags, by default. To view the bare metal options, you must enable the feature flags by completing the instructions in the Prerequisites section.

5.1. Prerequisites

You need the following prerequisites before creating a bare metal asset:

  • A deployed Red Hat Advanced Cluster Management for Kubernetes hub cluster on OpenShift Container Platform version 4.5, or later.
  • Access for your Red Hat Advanced Cluster Management for Kubernetes hub cluster to connect to the bare metal asset.
  • A configured bare metal asset, and log in credentials with the required permissions to log in and manage it. Note: Login credentials for your bare metal asset include the following items for the asset that are provided by your administrator:

    • user name
    • password
    • Baseboard Management Controller Address
    • boot NIC MAC address
  • 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"}]}]}}}}'

      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"
              ...
    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"}]}]}}}}'

      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"
              ...
    4. Make sure the console-chart-...-consoleui... and console-header-... pods are running:

      oc -n open-cluster-management get pods
    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.