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

Mandatory

Descripiton

dataVolumes

Yes

Data disk of a 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, see https://support.huaweicloud.com/en-us/tr-aos/datatypes-cce-datavolume.html.

availabilityZone

Yes

AZ where a 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 belonged region. For details, visit https://developer.huaweicloud.com/en-us/endpoint.

Suggestion: 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. For details about the AZ of each region, visit $http://developer.huaweicloud.com/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 K8S 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.

Suggestion: Customize the value.

clusterId

No

ID of the cluster to which the resource belongs

Type: HuaweiCloud.CCE.Cluster.Id

Value Description: Indicates the 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: 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. Connect to the cluster object and use the get_reference function to obtain the cluster ID.

preInstall

No

Node pre-installation script

Type: string

Value Description: Supports customization

Value Constraint: The script you specify here will be executed before K8S software is installed. Note that if the script is incorrect, K8S 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 Constraint: Only one elastic IP address can be defined for each node.

Suggestion: Customize the value. For details, see https://support.huaweicloud.com/en-us/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: 1

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, see https://support.huaweicloud.com/en-us/tr-aos/datatypes-ecs-rootvolume.html.

os

No

OS of Node

Type: string

Value Description: Supports customization.

Default: EulerOS 2.2

Suggestion: Customize the value.

nodePasswd

No

Password of nodes' root

Type: password

Value Description: Supports customization.

Value Constraint: 1. The parameter must be written into inputs and imported using the get_input function. 2. The value consists of uppercase and lowercase letters, numbers, and special symbols !@$%^-_=+[{}]:,./? and contains at least two, length 8 ~26 bit, non-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 specification

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/en-us/productdesc-ecs/en-us_topic_0159822360.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 the 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 in advance on the ECS console.

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.

Suggestion: Supports customization.

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 specification
    label: ''
  ccenp1ep_sshKeyName:
    description: Key pair used for logging in to a node
    label: ''