• Cloud Container Engine

cce
  1. Help Center
  2. Cloud Container Engine
  3. User Guide 2.0
  4. Cluster Management
  5. Creating a BMS Cluster

Creating a BMS Cluster

Private Bare Metal Server (BMS) clusters are Kubernetes container clusters with high computing and high network performance. To use a BMS cluster, enable the BMS service first.

To provide a high-speed container network, you need to add a high-speed network interface card (NIC) when creating a BMS.

Constraints

BMS clusters do not support native container cluster monitoring and performance analysis for Kubernetes (Heapster/Metrics-server).

You need to choose physical.o2.medium flavor when you use the BMS expansion feature in CCE.

Prerequisites

  • Before creating your first cluster, you must create a VPC and a key pair. For details, see Creating a VPC and a Key Pair.
  • The BMS service has been enabled. For details, see Allocating a BMS.
  • A high-speed network has been created. For details, see Creating and Configuring a High-Speed Network. A high-speed network is an internal network among BMSs and provides unlimited bandwidth for connecting BMSs in the same AZ. If you want to deploy services requiring high throughput and low latency, you can create high-speed networks.

Creating a Cluster

  1. Log in to the CCE console. In the navigation pane, choose Resource Management > BMS Clusters, and click Create BMS Cluster.
  2. Set the parameters listed in Table 1. The parameters marked with * are mandatory.

    Table 1 Parameters for creating a cluster

    Parameter

    Description

    * Region

    Physical location of a cluster.

    * Name

    Name of the cluster to be created.

    * Version

    Base version of this Kubernetes cluster

    * Size

    Size of the cluster to be created.

    * High Availability

    • Yes: Three masters will be created in the same AZ for the cluster. A master manages and controls the entire cluster. The cluster remains available when two of the masters are faulty.
    • No: Only one master is created for the cluster. The cluster becomes unavailable if the master is faulty, but running applications are not affected.

    * VPC

    VPC where the new cluster is located.

    If no VPC is available, click Create a VPC and create one.

    * Subnet

    Subnet environment where the BMS runs.

    * High-Speed Network

    Select a high-speed network.

    The high-speed network is an internal network for BMSs that provides unlimited bandwidth for BMSs in the same AZ.

    For details, see Creating and Configuring a High-Speed Network.

    * Container Network Segment

    Container network segment that contains IP addresses that can be allocated to container instances.

    NOTICE:
    • Once a cluster is created, the container network segment cannot be changed. You need to re-create the cluster to change the container network segment.
    • Plan container network segments before creating a cluster. If different clusters share a container network segment, IP address conflicts and application access exceptions will occur.
    • The mask determines the number of available nodes in a cluster. Set the mask properly for the container network segment. Otherwise, the number of available nodes in the cluster may be insufficient.

    Description

    Cluster description.

  3. After the configuration is complete, click Create Now.
  4. Review the settings and then click Submit.

    The request for creating a BMS cluster is submitted successfully. You can go to the cluster list and wait until the cluster becomes available. It takes 5 to 10 minutes to complete the cluster creation.

Adding Existing Nodes to a BMS Cluster

  1. Log in to the CCE console. In the navigation pane, choose Resource Management > BMS Clusters.
  2. Click Add to Cluster for the target cluster. The BMSs that can be added to the cluster are displayed.
  3. Select the BMS that you want to add to the cluster. Click Next.
  4. Follow the instructions on the current page to add the BMS to the cluster.

    NOTE:

    If the login session expires or the network connection is interrupted during the procedure of adding a BMS node to the cluster, you need to uninstall the BMS node and then add the BMS node to the cluster again.

    • Install
      1. Check whether the BMS has an exclusive data disk. If not, attach a data disk to the BMS to increase system stability.

        The data disk can be a raw disk or a Linux LVM partition.

      2. If no EIP is bound to the BMS, bind an EIP.
        1. Click Service List, and choose Network > Elastic IP.
        2. On the Elastic IP page, click Assign EIP to create an EIP.
        3. Bind the EIP to the BMS.
      3. Log in as the linux user to the BMS.
      4. Create the install.yaml file.

        vi install.yaml

      5. Copy the following configurations to the install.yaml file.
        NOTE:

        BMSs are identified by private IP addresses. Do not modify the install.yaml file except the login information (domain name, username, and password). Configure the password and privateKey as required.

        user:
          domainName: test
          username: public
          password: "" #Enter your password enclosed in double quotation marks.
          projectName: eu-de
        apiGatewayIp: 10.125.1.20
        iamHostname: iam.eu-de.otc.t-systems.com
        serverEndpoint: 10.125.1.15:6443
        clusterID: 52a48fcc-0b07-11e9-8abe-0255ac101404
        clusterType: BareMetal
        defaultPrivateKey: #(Optional) Enter the absolute path to your default login key pair file.
        hosts:
          - host: 172.16.2.124
            user: linux
            highwayIps: 192.168.63.248
            privateKey: #Enter the absolute path to the key pair file of the linux user. If this field is left blank, the absolute path to the default key pair file is used.
            nodeConfig:
              dockerBlockDevices: #(Optional) Enter the drive letters of data disks (/dev/sdb) or Linux LVM partitions (/dev/sdc1) attached to the BMS, and separate them using a comma (,). Example: /dev/sdb,/dev/sdc1.

      6. Run the following command to add the BMS to the cluster. This operation takes 3 to 5 minutes.

        curl -k https://10.125.80.70/cluster-versions/base/cceadm -H "Host:cluster-versions.obs.eu-de.otc.t-systems.com" -1 -O;chmod u+x cceadm; ./cceadm batch --conf=install.yaml

    • Uninstall
      1. Log in to the BMS to be uninstalled as the linux user. To uninstall the BMSs in batches, log in to either of them.
      2. Create the uninstall.yaml configuration file.

        vi uninstall.yaml

      3. Write the uninstall.yaml file.
        NOTE:

        Changing the information may cause uninstallation failure.

        OBSServerIp: 10.125.80.70
        
        OBSBucketHostname: cluster-versions.obs.eu-de.otc.t-systems.com
        
        version: v1.11.3-r1
        
        defaultPrivateKey: #(Optional) Enter the absolute path to your default login key pair file.
        
        hosts:
        
          - host: 172.16.2.124
        
            user: linux
        
            privateKey: #Enter the absolute path of the key pair file of the linux user to log in to the BMS. Either this parameter must be specified. If this parameter is left blank, the default key pair file is used.
      4. Run the following command to uninstall CCE related components on the BMS. The operation takes about 3 to 5 minutes.

        curl -k https://10.125.80.70/cluster-versions/base/cceadm -H "Host:cluster-versions.obs.eu-de.otc.t-systems.com" -1 -O;chmod u+x cceadm; ./cceadm batch-uninstall --conf=uninstall.yaml

    After the operations are complete, click Next.

    The system displays a message, asking you to confirm that all the required operations are completed on the BMS. Click OK.

  5. Review the configurations of the BMS to be added to the cluster. Click Finish.

    The system automatically switches to the Nodes page. Wait until the BMS is successfully added to the cluster.