Deploying Bare Metal clusters with Fusion Data Foundation
You can create a Hosted Control Plane cluster by using Bare Metal hosts either through the OpenShift® Console or the Hosted Control Plane CLI.
Before you begin
- Ensure you meet the following prerequisites:
Procedure
- Go to ACM user interface.
- Go to Infrastructure > Clusters > Create cluster.
- Select Host Inventory and then Hosted.
- Enter the credentials. The credentials should include the following:
- cloud.openshift.com
- cp.icr.io
- quay.io
- registry.connect.redhat.com
- registry.redhat.io
- Enter Cluster name. Important: It is crucial that the cluster name is the same name used in the network planning. Do not use a name that does not have an alias entry. The cluster is a part of the base domain. For example,
mydomain.com
. Controller and Infrastructure availability are environment dependent.Though the recommendation is to have 3 nodes for a resilient cluster, you can have a single node Hosted Control Plane cluster.
- Enter Namespace. It is the namespace of the infrastructure environment of the hosts.
- Enter Labels. These are the labels found on hosts in this particular infrastructure environment. To ensure certain hosts are in a particular cluster, use the labels. Otherwise, a random host from that infrastructure environment gets chosen.
- Enter the Networking type. The value is environment dependent, but you can choose LoadBalancer type for resilience. The SSH public key must be the same that you used during host import.
- Open the YAML and add the following in the
spec
section: HCP cluster to use the specially created Local Volume Storage for HCPspec: etcd: managed: storage: persistentVolume: size: 8Gi storageClassName: lvms-hcp-etcd type: PersistentVolume managementType: Managed
It causes the Hosted Control Plane cluster to use the Local Volume Storage created for it.
- Click Finish. The cluster creation starts and it can take up to half an hour. After the nodepool hosts are in the ready state, add the load balancer for the console to be available.
- If you choose LoadBalancer networking type, then add a load balancer to the newly created
Hosted Control Plane cluster. You need the load balancer to gain external access to the Hosted Control Plane cluster. Using a load balancer allows the nodes to be resilient as opposed to the nodeport approach. The load balancer gets added to the newly created Hosted Control Plane cluster, and not the IBM Fusion HCI System hub cluster.
- To access the new Hosted Control Plane cluster,
download the kubeconfig. Steps to download the kubeconfig:
- Log in to the IBM Fusion HCI System hub OpenShift console.
- Go to the ACM user interface and select Infrastructre > Clusters.
- In the clusters list, select the newly created Hosted Control Plane cluster.
- In the Cluster nodepools section, click Download
kubeconfig. It downloads the kubeconfig for the cluster.
After the kubeconfig is available, use the OC commands to create YAMLs on the new Hosted Control Plane cluster.
- Create metallb operator.
- Create a new YAML file.Example YAML:
apiVersion: v1 Kind: Namespace metadata: name: metallb labels: openshift.io/cluster-monitoring: “true” annotations: workload.openshift.io/allowed: management —— apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: metallb-operator-operatorgroup namespace: metallb — apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: metallb-operator namespace: metal spec: channel: “stable” name: metallb-operator source: redhat-operators sourceNamespace: openshift-marketplace
- Apply the
YAML:
oc --kubeconfig=kubeconfig.yaml apply -f metallb-operator-config.yaml
- Wait for all the pods to be up and
running.
oc --kubeconfig=kubeconfig.yaml get pods -n metallb
- Create a new YAML file.Example YAML:
- Create an instance of metallb
- Create a new file metallb-instance-config.yaml.Example:
apiVersion: metallb.io/v1beta1 kind: metallb metadata: name: metallb namespace: metallb
- Apply the file:
oc --kubeconfig=kubeconfig.yaml apply -f metallb-instance-config.yaml
- Wait for the pods to be up and
running
oc --kubeconfig=kubeconfig.yaml get pods -n metallb
- Create a new file metallb-instance-config.yaml.Example:
- Create an
IPAddressPool
andL2Advertisement
.- Create an
IPAddressPool named ipaddresspool-l2advertisement-config.yaml
.Example:apiVersion: metallb.io/v1beta1 kind: IPAddressPool metadata: name: hcpip namespace: metallb spec: protocol: layer2 autoAssign: false addresses: - 1.23.45.678-1.23.45.678 --- apiVersion: metallb.io/v1beta1 kind: L2Advertisement metadata: name: hcpip namespace: metallb spec: ipAddressPolls: - hcpip
The name of the
IPAddressPool
must match the one in theL2Advertisement
.The addresses must be the IPAddress in the DNS that is the
*.apps.NAMEofCluster
in the DNS network table set up by the network administrator. - Apply the
ipaddresspool-l2advertisement-config.yaml.
oc --kubeconfig=kubeconfig.yaml apply -f ipaddresspool-l2advertisement-config.yaml
- Create an
- Create a service for the
loadbalancer
.- Create metallb-loadbalancer-service.yaml.Note: The
address-pool
must match the name of theaddresspool
in previous step.Example:kind: Service apiVersion: v1 metadata: annotations: metallb.universe.tf/address-pool:hcpip name:metallb-ingress namespace:openshift-ingress spec: ports: - name:http protocol:TCP port:80 targetPort:80 - name:https protocol:TCP port:443 targetPort:443 selector: ingresscontroller.operator.openshift.io/deployment-ingresscontroller:default type:LoadBalancer
- Apply the load balancer service
YAML.
oc --kubeconfig=kubeconfig.yaml apply -f metallb/metallb-loadbalancer-service.yaml
- Monitor the Cluster Operator console for
issues:
oc --kubeconfig=kubeconfig.yaml get co
- Create metallb-loadbalancer-service.yaml.
- To access the new Hosted Control Plane cluster,
download the kubeconfig.