Updated on 2023-08-11 GMT+08:00

CCE.NodePool

Element Description

The CCE.NodePool element is used to deploy Kubernetes node resources at the Huawei PaaS layer. Deploying this type of resources enables users to orchestrate Huawei cloud resources on nodes, providing more powerful functions.

Element Properties

Table 1 Property description

Property

Required

Description

dataVolumes

Yes

Data disk of the created node

Type: CCE.DataVolume array

Value Description: Supports customization, for example, [{"volumeType":"SATA","size":100}].

Value Constraint: Array format. Currently, only one object is supported.

Suggestion: Customize the value. For details, visit https://support.huaweicloud.com/eu/tr-aos/datatypes-cce-datavolume.html.

availabilityZone

Yes

AZ where the node is located

Type: HuaweiCloud.ECS.AvailabilityZone.Name

Value Description: Indicates the AZ where the to-be-created ECS is located. The name of the AZ needs to be specified, for example, cn-north-1a. See the Regions and Endpoints.

Value Constraint: The value varies depending on the region. For details, visit https://developer.huaweicloud.com/intl/en-us/endpoint.

Suggestion: 1. Use the get_input function to pass this parameter. Its value can then be automatically selected when you create a stack on the AOS console. 2. For details about the AZs of each region, visit https://developer.huaweicloud.com/intl/en-us/endpoint.

name

Yes

Name of the created node

Type: string

Value Description: Supports customization.

Value Constraint: The value contains 4 to 32 characters and must start with a lowercase letter. Only lowercase letters, digits, and underscores (_) are allowed.

Suggestion: Customize the value. Generally, the stack name is used as the node name.

publicKey

No

Public key of the key pair. For periodic nodepool, this field is mandatory.

Type: HuaweiCloud.ECS.KeyPair.PublicKey

Value Description: Selects an existing public key.

Suggestion: Use the get_input function to pass this parameter. Its value can then be automatically selected based on parameter sshKeyName when you create a stack on the AOS console.

postInstall

No

Node post-installation script

Type: string

Value Description: Supports customization.

Value Constraint: The script you specify here will be executed after Kubernetes software is installed.

Suggestion: The script is usually used to modify container parameters.

labels

No

Labels of Node

Type: CCE.Labels array

Value Description: Supports customization, for example, {"app": "aos"}.

Suggestion: Enters multiple key-value pairs to customize the value.

clusterId

No

ID of the cluster to which a resource belongs.

Type: HuaweiCloud.CCE.Cluster.Id

Value Description: ID of an existing or new container cluster.

Value Constraint: The value must satisfy the UUID rule and support a maximum of 64 characters.

Suggestion: 1. Enter the cluster ID. Specifically, log in to the CCE console, and choose Resource Management > Clusters. Click the target cluster, and you can then obtain its cluster ID. 2. Connect to the cluster object and use the get_reference function to obtain the cluster ID. Connect to the cluster object and use the get_reference function to automatically obtain the value.

preInstall

No

Node pre-installation script

Type: string

Value Description: Supports customization.

Value Constraint: The script you specify here will be executed before Kubernetes software is installed. Note that if the script is incorrect, Kubernetes software may not be installed successfully.

Suggestion: The script is usually used to format data disks.

publicIp

No

Virtual IP address of the created node

Type: CCE.PublicIP

Value Description: Supports customization, for example, {"eip":{"bandwidth:{"shareType":PER}, 5_sbgp"}}.

Default Value: {}

Value Constraint: Only one elastic IP address can be defined for each node.

Suggestion: Customize the value. For details, visit https://support.huaweicloud.com/eu/tr-aos/datatypes-cce-publicip.html.

instances

Yes

Number of created nodes

Type: integer

Value Description: Supports customization. The value ranges from 1 to 50.

Default Value: 1

Value Constraint: {u'in_range': [1, 50]}

Suggestion: Set the value based on specifications and requirements.

rootVolume

Yes

System disk of the created node

Type: ECS.RootVolume

Value Description: Supports customization, for example, {"volumeType":"SATA","size":40}.

Default: {u'volumeType': u'unset', u'size': 40}

Suggestion: Customize the value. For details, visit https://support.huaweicloud.com/eu/usermanual-iaas/en-us_topic_0040259342.html.

os

No

OS of Node

Type: string

Value Description: ["EulerOS 2.2", "CentOS 7.4"]

Default: EulerOS 2.2

Value Constraint: {u'valid_values': [u'CentOS 7.4', u'EulerOS 2.2']}

nodePasswd

No

Password of nodes' root

Type: password

Value Description: Supports customization.

Value Constraint: 1. The parameter must be written into inputs and set using the get_input function. 2. Enter 8 to 26 characters. Only letters, digits, and special characters !@$%^-_=+[{}]:,./? are allowed. The value must contain at least two types of characters and must not be a weak password.

Suggestion: You are advised to use the get_input function to obtain the value and avoid plaintext passwords to ensure security.

flavor

Yes

Container node specifications

Type: HuaweiCloud.CCE.Node.Flavor.Name

Value Description: System flavor ID of the ECS to be created. For example, c1.medium indicates 1 vCPU | 1 GB, and c2.large indicates 2 vCPU | 4 GB. For details about the available flavors, see ECS Specifications at https://support.huaweicloud.com/eu/productdesc-ecs/ecs_01_0014.html. It is advised to use the get_input function to pass this parameter.

Suggestion: Select the node specification during node creation on the CCE console. In the node template, you can set inputs to specify the node specification.

sshKeyName

No

Key pair used for logging in to a node, which needs to be kept properly

Type: HuaweiCloud.ECS.KeyPair.Name

Value Description: Must be created on the ECS console in advance.

Suggestion: 1. You are advised to use the get_input function to define the parameter so that you can select a value when using the template. 2. Query information on the ECS page and then enter such information accordingly.

annotations

No

Annotations of Node

Type: dict

Value Description: Supports customization, for example, {"app": "aos"}.

Suggestion: Enter multiple key-value pairs to customize the value.

Relationships Between Elements

Table 2 Relationship description

Description

Target

ContainedIn

CCE.Cluster

Connected

ECS.KeyPair

Connected

CCE.ConfigMap

Connected

CCE.Job

Connected

CCE.Storage.OBS

Connected

CCE.Service

Connected

CCE.DaemonSet

Connected

CCE.StatefulSet

Connected

CCE.Secret

Connected

CCE.Deployment

Connected

CCE.Ingress

Connected

CCE.Pod

Connected

CCE.NodePool

Connected

CCE.Storage.SFS

Connected

CCE.Storage.EVS

Return Value

Property

Type

Description

floatingIpId

string

ID of an elastic IP address

clusterId

string

Cluster ID

refName

string

Node name

privateIp

Array

List of private elastic IP addresses

publicIp

Array

List of public elastic IP addresses

refID

string

Node ID

Blueprint Example

tosca_definitions_version: huaweicloud_tosca_version_1_0
node_templates:
  ccenp1ep:
    type: HuaweiCloud.CCE.NodePool
    properties:
      dataVolumes:
        - volumeType: SATA
          size: 100
      name: ''
      instances: 1
      rootVolume:
        volumeType: SATA
        size: 40
      flavor:
        get_input: ccenp1ep_flavor
      sshKeyName:
        get_input: ccenp1ep_sshKeyName
inputs:
  ccenp1ep_flavor:
    description: Container node specifications
    label: ''
  ccenp1ep_sshKeyName:
    description: Key pair used for logging in to a node. Keep the key pair properly.
    label: ''