Home / Platform management / Clusters / Clusters / Self-built cluster / Creating a Cluster

Creating a Cluster

The platform enables you to build a Kubernetes business cluster based on your infrastructure.

Constraints and Limitations

Prerequisites

Steps

  1. In the left navigation bar, click Cluster Management > Clusters.

  2. Click Create Cluster.

  3. Follow the instructions below to configure Basic Information, Container Network, Node Configuration, and Advanced Parameters.

Configure Basic Information

Parameter Description
Kubernetes Version Version of Kubernetes components in the cluster and supported container runtime component types and versions for the selected version.
Tip: When other business components to be deployed on the cluster have strong dependencies on the Kubernetes version, please choose an appropriate version based on the cluster’s business purpose, referring to Self-built Cluster Component Version Requirements .
Runtime Component Types and versions of container runtime components supported by the selected Kubernetes Version. Refer to How to Choose Runtime Components? for more information.
Cluster Address Access address for the cluster’s exposed API Server, which must support the https protocol.

  • Self-built VIP: Choose Enable Self-built VIP and enter the applied VRID (Virtual Router ID) and set the IP Address/Domain Name to the VIP you applied (the Port must be 6443).
    Tip: After creating the cluster with a self-built VIP, the cluster’s access address will be <VIP>:6443.
  • Disable Self-built VIP: Depending on the planned number of control nodes, configure the IP Address/Domain Name and Port.
    • When the number of control nodes in the cluster is 3 or 5, the IP Address/Domain Name must be the access address or domain name of a load balancer outside the cluster that you prepared in advance (e.g., F5 devices, IaaS-layer load balancers, or HAProxy software).
    • When there is only 1 control node in the cluster, the IP Address/Domain Name can be the private IP/domain name of the control node or the access address/domain name of a load balancer outside the cluster. If you plan to add control nodes after creating the cluster for future expansion, it is recommended to enter the access address/domain name of a load balancer prepared in advance for ease of scalability.
      Note: When using load balancing, the Port is the port number of the load balancer; when not using load balancing, the Port must be set to 6443.
  • External Access: In some scenarios, global clusters cannot communicate using intranet addresses with business clusters. You can configure an external access address for the cluster to interact with the global cluster using public addresses.
    • Enable External Access: Enter the domain name or IP and port information of the external access address. Ensure the following conditions are met:
      • Configure API Server port forwarding: Make sure the external address + port you entered can be forwarded to the intranet cluster address or the 6443 port of each master node.
      • Configure Platform-related Service port forwarding: Ensure that the external address 11780 and 11781 ports can be forwarded to the intranet cluster address 11780, 11781, or the 11780 and 11781 ports of each master node.
      • Ensure Business Clusters Can Access the Global Cluster: In the Extra Args section of the Node Settings area, add a Cluster annotation key-value pair: cpaas.io/platform-url: <public access address of the global cluster, e.g., https://publicIP:443>.
        Note: For users using the DevOps platform pipeline, you also need to configure the platform access address as specified in Specify Platform Access Address in Business Cluster in the business cluster.
      • Configure Image Repository: Only external image repositories are supported, so ensure that you can pull platform images normally. For example, if you access the image repository under the global cluster using a public address, it will use public traffic. For the configuration process, please refer to What Should I Do If Business Clusters Cannot Access the Platform Default Image Repository? .
    • Disable External Access: Global clusters and business clusters communicate using intranet addresses. If business clusters created later need to access the public address of the global cluster, you can refer to the relevant descriptions for enabling external access and check each item for matching configurations in the future.
Image Repository Repository for storing platform component images required for the cluster.
- Platform Default: The image repository configured during global deployment.
- Private Repository: A repository you set up in advance that contains the required platform component images. You need to enter the Private Image Repository Address, Port, Username, and Password to access the image repository.
- Public Repository: Use an image repository service located on the public network. Before using it, you need to refer to Update Public Image Repository Cloud Credentials to obtain repository authentication permissions.

Tip: If the current cluster nodes cannot access the Platform Default image repository, please refer to What Should I Do If Business Clusters Cannot Access the Platform Default Image Repository? .
Hardware Architecture The hardware architecture type of the cluster, supporting X86 or ARM. Note: Only nodes with the same hardware architecture type as the selected type can be added to the current cluster.

Configure Container Networking

Parameter Description
IPv4/IPv6 Dual Stack Whether to enable IPv4/IPv6 dual stack. Enabling dual stack support can effectively address the limited IPv4 network address resources. After turning on the switch, nodes under the cluster can run in dual stack mode, meaning nodes can have both IPv4 and IPv6 addresses. Both of these IP addresses can be used for intranet/public network access. Note that Flannel does not support dual stack mode.
Note: A cluster enabled with dual stack cannot be reverted to IPv4 single stack.

It is recommended to enable dual stack when your business application involves the following scenarios:
- Your application needs to provide services for users using IPv6 terminals.
- You need to analyze the access sources of services provided by IPv6 terminal access to the application.
- If your application system needs to use IPv6 for intranet access to other systems (e.g., database systems) or application systems.
Network Mode and Related Configuration - Kube-OVN
- Calico
- Flannel
- Custom

Configure Node Settings

Parameter Description
NIC The name of the host NIC device used by the cluster network plugin.
Note: When the Kube-OVN default subnet selects the Underlay transmission mode, you need to specify the NIC name. At this time, the NIC is the default NIC for bridged networking.
Node Name You can choose to use the node IP or hostname as the name of the node on the platform.
Note: When choosing to use the hostname as the name of the node on the platform, ensure that the host names of the nodes added to the cluster are unique.
Node Information Add nodes to the cluster or recover temporarily saved configuration data from drafts. For detailed information, please refer to Node Configuration Parameter Description .

Note:
- When the operating system of the node is EulerOS, you need to add the cgroup-driver: cgroupfs key-value pair to the kubelet parameters in the Extended Parameters area.
- At least one control node must be added, and the number of control nodes can only be 1, 3, or 5. The cluster has multi-backup disaster recovery capabilities when the number of control nodes is greater than or equal to 3. It is not recommended to use a cluster with only one control node for production.
Monitoring Component Type Supports Prometheus and VictoriaMetrics. The choice of monitoring tools can be referred to in the document How to Choose Monitoring Components?

When choosing VictoriaMetrics monitoring components, you need to configure the Deployment Mode:
- Deploy VictoriaMetrics: Deploy all related components, including VMStorage, VMAlert, VMAgent, etc.
- Deploy VictoriaMetrics Proxy: Only deploy log collection components, i.e., VMAgent. When using this deployment mode, you need to associate it with VictoriaMetrics instances already deployed on other clusters in the platform to provide monitoring services to the cluster.
Monitoring Component Deployment Nodes Choose the nodes used to deploy cluster monitoring components, supporting compute nodes and control nodes that allow application deployment.
To avoid impacting cluster performance, it is recommended to prioritize compute nodes. After the cluster is successfully created, monitoring components with local volume storage will be deployed on the selected nodes.

Note: If you choose not to configure this parameter (do not deploy monitoring components) when creating the cluster, you can go to the cluster’s Plugins page to deploy monitoring components for the cluster after the cluster is successfully created. At that time, you can choose Local Volume, Storage Class, or Persistent Volume for storage types. For specific operations, please refer to Deploy Monitoring Components .

Table - Node Configuration Parameter Description

Parameter Description
Type Control Node: Responsible for running components such as kube-apiserver, kube-scheduler, kube-controller-manager, etcd, container network, and part of platform management components in the cluster. When Deployable Applications is enabled, control nodes can also be used as compute nodes.
Compute Node: Responsible for running business container groups in the cluster.
Note: If there are no compute nodes in the cluster, the cluster can only run platform components and a few businesses and cannot run normal production businesses.

Note: Clicking on the left of Type can expand more node configuration parameters.
IPv4 Address The IPv4 address of the node. For clusters created in intranet mode, please enter the private IP of the node.
IPv6 Address This parameter is effective when the cluster enables IPv4/IPv6 dual stack. It is the IPv6 address of the node.
Deployable Applications This parameter is effective when the Node Type is Control Node. It specifies whether to allow business applications to be deployed on this control node, which schedules container groups related to business applications to this node.
Display Name The display name of the node.
SSH Connection IP When accessing the node through the SSH service, you can connect to the node’s IP address. If you can log in to the node using ssh <username>@<node's IPv4 address>, you do not need to set this parameter. Otherwise, you need to enter the public IP of the node or the external IP of NAT to ensure that the global cluster and agents can connect to the node through this IP.
NIC Name Please fill in the NIC name used by the node. The priority of NIC configuration that takes effect is as follows, from left to right, in descending order of priority:
kube-OVN Underlay: Node NIC > Cluster NIC
kube-OVN Overlay: Node NIC > Cluster NIC > NIC corresponding to the default route of the node
Calico: Cluster NIC > NIC corresponding to the default route of the node
Flannel: Cluster NIC > NIC corresponding to the default route of the node
Associated Bridged Network Note: Bridged networks cannot be configured when creating clusters. When adding nodes to the cluster, you can configure this option only if Underlay subnets have been created in the cluster. Select the created bridged network . If you do not want to use the default NIC of the bridged network, you can configure the node NIC separately.
SSH Port The SSH service port number, e.g., 22.
SSH Username SSH username, you need to enter the username with root privileges, e.g., root.
Proxy Whether to access the node’s SSH port through a proxy. When the global cluster cannot directly access the node to be added (e.g., the global cluster and the business cluster are not in the same network segment; the node’s IP is an intranet IP and the global cluster cannot directly access it), you need to turn on this switch and configure proxy-related parameters. After configuring the proxy, you can access and deploy the node through the proxy.
Note: Currently, only SOCKS5 proxy is supported.

Address: The address of the proxy server, e.g., 192.168.1.1:1080.
Username: The username for accessing the proxy server.
Password: The password for accessing the proxy server.
Node Authentication The authentication method for logging in to the added node and the corresponding authentication information. You can choose:
Password: You need to enter the username with root privileges and the corresponding SSH password.
Key: You need to enter the private key and private key password with root privileges.
Save as Draft Save the configured data in the current dialog box as a draft and close the Add Node dialog box.
Without leaving the Create Cluster page, you can open the Add Node dialog box and restore the configured data saved as a draft by selecting Restore from Draft.
Note: The data restored from the draft is the data saved as a draft most recently.

(Optional) Configure Extended Parameters

Note:

Operational Steps

  1. Click Extended Parameters to expand the extended parameter configuration area. You can choose to set the following extended parameters for the cluster.

    Parameter Description
    Docker Parameters dockerExtraArgs, additional Docker configuration parameters that will be written to /etc/sysconfig/docker. It is recommended not to modify them. When configuring Docker through the daemon.json file, it must be configured in the key-value pair format.
    Kubelet Parameters kubeletExtraArgs, additional Kubelet configuration parameters.

    Note: After entering the Number of Node IPs parameter in the Node IP Count parameter under Container Network, a default Kubelet parameter configuration with the key max-pods and the value being the Node IP Count will be automatically generated. This is used to set the maximum number of container groups that can run on any node in the cluster, and this configuration will not be displayed on the interface. If you add max-pods: Maximum number of containers that can run key-value pairs to the Kubelet Parameters area, it will overwrite the default value. The value can be any positive integer, and it is recommended to use the default value (number of node IPs) or enter a value not exceeding 256.
    Controller Manager Parameters controllerManagerExtraArgs, additional Controller Manager configuration parameters.
    Scheduler Parameters schedulerExtraArgs, additional Scheduler configuration parameters.
    APIServer Parameters apiServerExtraArgs, additional APIServer configuration parameters.
    APIServer Address publicAlternativeNames, the APIServer access addresses included in the certificate. You can only enter IP addresses or domain names, with a maximum length of 253 characters.
    Cluster Annotation Parameters Annotation information for the cluster, marking the characteristics of the cluster under metadata in the form of key-value pairs for platform components or business components to obtain related information.
  2. Click Create. Return to the cluster list page, and the cluster is in the Creating state.

Note: When the cluster is in the Creating state, you can check the progress of the execution. For specific operations, please refer to the Follow-Up Operations section.

Follow-Up Operations

View Execution Progress

In the cluster list page, you can view the list information of the created clusters. Among them, clusters in the Creating state can view the execution progress.

Operational Steps

  1. Click View Execution Progress > on the right side of the cluster in the Creating state.

  2. In the pop-up execution progress dialog box, you can view the execution progress of the cluster (status.conditions).

Note: When a certain type is being executed or the status is failed with a reason, you can hover over the corresponding reason (displayed in blue font) to view the detailed information of the reason (status.conditions.reason).

Deploy Plugins

After successfully creating the cluster, you can go to Plugin Management to select the necessary plugins for the cluster, including monitoring components, log collection components, log storage components, and more.

Associate Projects

You can add the newly created cluster to an existing project through Create Project based on the cluster or by Adding a Project Associated with the Cluster .

You can then create namespaces under the cluster through Create Namespace to allocate cluster resources to namespaces, providing a runtime environment for business containers.