すべてのプロダクト
Search
ドキュメントセンター

Resource Orchestration Service:ALIYUN::CS::AnyCluster

最終更新日:Apr 10, 2025

ALIYUN::CS::AnyCluster は、任意のタイプの Container Service for Kubernetes (ACK) クラスタを作成するために使用されます。

構文

{
  "Type": "ALIYUN::CS::AnyCluster",
  "Properties": {
    "ClusterConfig": Map
  }
}

プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

ClusterConfig

Map

はい

いいえ

クラスタの構成。

詳細については、「CreateCluster」をご参照ください。

戻り値

Fn::GetAtt

  • ClusterId: クラスタの ID。

  • TaskId: タスクの ID。タスク ID はシステムによって自動的に割り当てられ、タスクのステータスを照会するために使用されます。

  • WorkerRamRoleName: ワーカーノードの Resource Access Management (RAM) ロールの名前。

  • DefaultUserKubeConfig: クラスタ認証情報のデフォルトの kubeconfig ファイル。

  • ScalingRuleId: スケーリングルールの ID。

  • ScalingGroupId: スケーリンググループの ID。

  • PrivateUserKubConfig: クラスタ認証情報の非公開 kubeconfig ファイル。

  • ScalingConfigurationId: スケーリング構成の ID。

  • Nodes: クラスタ内のノード。

  • APIServerSLBId: API サーバーが使用する Server Load Balancer (SLB) インスタンスの ID。

  • IngressSLBId: SLB Ingress の ID。

YAML 形式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  VpcId:
    Type: String
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
    Label:
      en: VPC
       
  VSwitchIds:
    Type: CommaDelimitedList
    AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
    AssociationPropertyMetadata:
      VpcId: VpcId
    Label:
      en: VSwitchIds
       
  KeyPairName:
    Type: String
    Label:
      en: Key Pair Name
       
    AssociationProperty: ALIYUN::ECS::KeyPair::KeyPairName
    Description:
      en: Please enter the name of the existing key pair. If you use the instance password Login, the key pair name does not need to be filled in
        
Resources:
  AnyCluster:
    Type: ALIYUN::CS::AnyCluster
    Properties:
      ClusterConfig:
        name: cluster-demo  # クラスタ名
        cluster_type: ManagedKubernetes # クラスタタイプ
        disable_rollback: true # ロールバック無効化
        timeout_mins: 60 # タイムアウト時間(分)
        kubernetes_version: 1.22.3-aliyun.1 # Kubernetes バージョン
        region_id:
          Ref: ALIYUN::Region # リージョンID
        snat_entry: true # SNAT エントリ
        cloud_monitor_flags: true # クラウドモニター有効化フラグ
        endpoint_public_access: false # パブリックエンドポイントアクセス無効化
        deletion_protection: true # 削除保護有効化
        node_cidr_mask: '26' # ノードCIDRマスク
        proxy_mode: ipvs # プロキシモード
        tags: [] # タグ
        timezone: Asia/Shanghai # タイムゾーン
        addons: # アドオン
          - name: flannel # flannel アドオン
          - name: csi-plugin # CSI プラグインアドオン
          - name: csi-provisioner # CSI プロビジョナーアドオン
          - name: storage-operator # ストレージオペレーターアドオン
            config: '{"CnfsOssEnable":"false","CnfsNasEnable":"true"}' # ストレージオペレーター設定
          - name: logtail-ds # Logtail デーモンセットアドオン
            config: '{"IngressDashboardEnabled":"true"}' # Logtail デーモンセット設定
          - name: ack-node-problem-detector # ノード問題検出アドオン
            config: '{"sls_project_name":""}' # ノード問題検出設定
          - name: nginx-ingress-controller # Nginx Ingress Controller アドオン
            config: '{"IngressSlbNetworkType":"internet","IngressSlbSpec":"slb.s2.small"}' # Nginx Ingress Controller 設定
          - name: ack-node-local-dns # ノードローカルDNSアドオン
          - name: arms-prometheus # ARMS Prometheus アドオン
          - name: alicloud-monitor-controller # Alibaba Cloud Monitor Controller アドオン
            config: '{"group_contact_ids":"[2066]"}' # Alibaba Cloud Monitor Controller 設定
        cluster_spec: ack.pro.small # クラスタスペック
        load_balancer_spec: slb.s2.small # ロードバランサースペック
        os_type: Linux # OS タイプ
        platform: AliyunLinux # プラットフォーム
        image_type: AliyunLinux # イメージタイプ
        runtime: # ランタイム
          name: containerd # ランタイム名
          version: 1.4.8 # ランタイムバージョン
        charge_type: PostPaid # 課金タイプ
        vpcid:
          Ref: VpcId # VPC ID
        container_cidr: 10.9.0.0/16 # コンテナCIDR
        service_cidr: 172.16.0.0/16 # サービスCIDR
        vswitch_ids:
          Ref: VSwitchIds # VSwitch ID
        key_pair:
          Ref: KeyPairName # キーペア
        logging_type: SLS # ロギングタイプ
        cpu_policy: none # CPU ポリシー
        is_enterprise_security_group: true # エンタープライズセキュリティグループ有効化
        controlplane_log_ttl: '30' # コントロールプレーンログTTL
        controlplane_log_components: # コントロールプレーンログコンポーネント
          - apiserver # API サーバー
          - kcm # kube-controller-manager
          - scheduler # スケジューラ
          - ccm # cloud-controller-manager
        nodepools: # ノードプール
          - nodepool_info: # ノードプール情報
              name: default-nodepool # ノードプール名
            scaling_group: # スケーリンググループ
              vswitch_ids:
                Ref: VSwitchIds # VSwitch ID
              system_disk_category: cloud_efficiency # システムディスクカテゴリ
              system_disk_size: 120 # システムディスクサイズ
              system_disk_performance_level: '' # システムディスクパフォーマレベル
              data_disks: [] # データディスク
              instance_types: # インスタンスタイプ
                - ecs.i2ne.xlarge # インスタンスタイプ
              tags: [] # タグ
              instance_charge_type: PostPaid # インスタンス課金タイプ
              soc_enabled: false # SOC 有効化
              key_pair:
                Ref: KeyPairName # キーペア
              is_enterprise_security_group: true # エンタープライズセキュリティグループ有効化
              platform: AliyunLinux # プラットフォーム
              image_id: aliyun_2_1903_x64_20G_alibase_20210726.vhd # イメージID
              image_type: AliyunLinux # イメージタイプ
              rds_instances: [] # RDS インスタンス
            kubernetes_config: # Kubernetes 設定
              cpu_policy: none # CPU ポリシー
              labels: [] # ラベル
              runtime: containerd # ランタイム
              runtime_version: 1.4.8 # ランタイムバージョン
            count: 3 # ノード数
        num_of_nodes: 0 # ノード数
Outputs:
  TaskId:
    Description: Task ID. Automatically assigned by the system, the user queries the task status. # タスク ID。システムによって自動的に割り当てられ、ユーザーはタスクステータスを照会します。
    Value:
      Fn::GetAtt:
        - AnyCluster
        - TaskId
  ClusterId:
    Description: Cluster instance ID. # クラスタインスタンス ID。
    Value:
      Fn::GetAtt:
        - AnyCluster
        - ClusterId
  ScalingGroupId:
    Description: Scaling group id # スケーリンググループ ID
    Value:
      Fn::GetAtt:
        - AnyCluster
        - ScalingGroupId
  ScalingRuleId:
    Description: Scaling rule id # スケーリングルール ID
    Value:
      Fn::GetAtt:
        - AnyCluster
        - ScalingRuleId
  DefaultUserKubeConfig:
    Description: Default user kubernetes config which is used for configuring cluster credentials. # デフォルトユーザー Kubernetes 構成。クラスタクレデンシャルの構成に使用されます。
    Value:
      Fn::GetAtt:
        - AnyCluster
        - DefaultUserKubeConfig
  WorkerRamRoleName:
    Description: Worker ram role name. # ワーカー RAM ロール名。
    Value:
      Fn::GetAtt:
        - AnyCluster
        - WorkerRamRoleName
  ScalingConfigurationId:
    Description: Scaling configuration id # スケーリング構成 ID
    Value:
      Fn::GetAtt:
        - AnyCluster
        - ScalingConfigurationId
  PrivateUserKubConfig:
    Description: Private user kubernetes config which is used for configuring cluster credentials. # 非公開ユーザー Kubernetes 構成。クラスタクレデンシャルの構成に使用されます。
    Value:
      Fn::GetAtt:
        - AnyCluster
        - PrivateUserKubConfig
  Nodes:
    Description: The list of cluster nodes. # クラスタノードのリスト。
    Value:
      Fn::GetAtt:
        - AnyCluster
        - Nodes

JSON 形式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "VpcId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
      "Label": {
        "en": "VPC",
         
      }
    },
    "VSwitchIds": {
      "Type": "CommaDelimitedList",
      "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
      "AssociationPropertyMetadata": {
        "VpcId": "VpcId"
      },
      "Label": {
        "en": "VSwitchIds",
         
      }
    },
    "KeyPairName": {
      "Type": "String",
      "Label": {
        "en": "Key Pair Name",
         
      },
      "AssociationProperty": "ALIYUN::ECS::KeyPair::KeyPairName",
      "Description": {
        "en": "Please enter the name of the existing key pair. If you use the instance password Login, the key pair name does not need to be filled in",
          
      }
    }
  },
  "Resources": {
    "AnyCluster": {
      "Type": "ALIYUN::CS::AnyCluster",
      "Properties": {
        "ClusterConfig": {
          "name": "cluster-demo", // クラスタ名
          "cluster_type": "ManagedKubernetes", // クラスタタイプ
          "disable_rollback": true, // ロールバック無効化
          "timeout_mins": 60, // タイムアウト時間(分)
          "kubernetes_version": "1.22.3-aliyun.1", // Kubernetes バージョン
          "region_id": {
            "Ref": "ALIYUN::Region" // リージョン ID
          },
          "snat_entry": true, // SNAT エントリ
          "cloud_monitor_flags": true, // クラウドモニター有効化フラグ
          "endpoint_public_access": false, // パブリックエンドポイントアクセス無効化
          "deletion_protection": true, // 削除保護有効化
          "node_cidr_mask": "26", // ノード CIDR マスク
          "proxy_mode": "ipvs", // プロキシモード
          "tags": [], // タグ
          "timezone": "Asia/Shanghai", // タイムゾーン
          "addons": [ // アドオン
            {
              "name": "flannel" // flannel アドオン
            },
            {
              "name": "csi-plugin" // CSI プラグインアドオン
            },
            {
              "name": "csi-provisioner" // CSI プロビジョナーアドオン
            },
            {
              "name": "storage-operator", // ストレージオペレーターアドオン
              "config": "{\"CnfsOssEnable\":\"false\",\"CnfsNasEnable\":\"true\"}" // ストレージオペレーター設定
            },
            {
              "name": "logtail-ds", // Logtail デーモンセットアドオン
              "config": "{\"IngressDashboardEnabled\":\"true\"}" // Logtail デーモンセット設定
            },
            {
              "name": "ack-node-problem-detector", // ノード問題検出アドオン
              "config": "{\"sls_project_name\":\"\"}" // ノード問題検出設定
            },
            {
              "name": "nginx-ingress-controller", // Nginx Ingress Controller アドオン
              "config": "{\"IngressSlbNetworkType\":\"internet\",\"IngressSlbSpec\":\"slb.s2.small\"}" // Nginx Ingress Controller 設定
            },
            {
              "name": "ack-node-local-dns" // ノードローカル DNS アドオン
            },
            {
              "name": "arms-prometheus" // ARMS Prometheus アドオン
            },
            {
              "name": "alicloud-monitor-controller", // Alibaba Cloud Monitor Controller アドオン
              "config": "{\"group_contact_ids\":\"[2066]\"}" // Alibaba Cloud Monitor Controller 設定
            }
          ],
          "cluster_spec": "ack.pro.small", // クラスタスペック
          "load_balancer_spec": "slb.s2.small", // ロードバランサースペック
          "os_type": "Linux", // OS タイプ
          "platform": "AliyunLinux", // プラットフォーム
          "image_type": "AliyunLinux", // イメージタイプ
          "runtime": { // ランタイム
            "name": "containerd", // ランタイム名
            "version": "1.4.8" // ランタイムバージョン
          },
          "charge_type": "PostPaid", // 課金タイプ
          "vpcid": {
            "Ref": "VpcId" // VPC ID
          },
          "container_cidr": "10.9.0.0/16", // コンテナ CIDR
          "service_cidr": "172.16.0.0/16", // サービス CIDR
          "vswitch_ids": {
            "Ref": "VSwitchIds" // VSwitch ID
          },
          "key_pair": {
            "Ref": "KeyPairName" // キーペア
          },
          "logging_type": "SLS", // ロギングタイプ
          "cpu_policy": "none", // CPU ポリシー
          "is_enterprise_security_group": true, // エンタープライズセキュリティグループ有効化
          "controlplane_log_ttl": "30", // コントロールプレーンログ TTL
          "controlplane_log_components": [ // コントロールプレーンログコンポーネント
            "apiserver", // API サーバー
            "kcm", // kube-controller-manager
            "scheduler", // スケジューラ
            "ccm" // cloud-controller-manager
          ],
          "nodepools": [ // ノードプール
            {
              "nodepool_info": { // ノードプール情報
                "name": "default-nodepool" // ノードプール名
              },
              "scaling_group": { // スケーリンググループ
                "vswitch_ids": {
                  "Ref": "VSwitchIds" // VSwitch ID
                },
                "system_disk_category": "cloud_efficiency", // システムディスクカテゴリ
                "system_disk_size": 120, // システムディスクサイズ
                "system_disk_performance_level": "", // システムディスクパフォーマレベル
                "data_disks": [], // データディスク
                "instance_types": [ // インスタンスタイプ
                  "ecs.i2ne.xlarge" // インスタンスタイプ
                ],
                "tags": [], // タグ
                "instance_charge_type": "PostPaid", // インスタンス課金タイプ
                "soc_enabled": false, // SOC 有効化
                "key_pair": {
                  "Ref": "KeyPairName" // キーペア
                },
                "is_enterprise_security_group": true, // エンタープライズセキュリティグループ有効化
                "platform": "AliyunLinux", // プラットフォーム
                "image_id": "aliyun_2_1903_x64_20G_alibase_20210726.vhd", // イメージ ID
                "image_type": "AliyunLinux", // イメージタイプ
                "rds_instances": [] // RDS インスタンス
              },
              "kubernetes_config": { // Kubernetes 設定
                "cpu_policy": "none", // CPU ポリシー
                "labels": [], // ラベル
                "runtime": "containerd", // ランタイム
                "runtime_version": "1.4.8" // ランタイムバージョン
              },
              "count": 3 // ノード数
            }
          ],
          "num_of_nodes": 0 // ノード数
        }
      }
    }
  },
  "Outputs": {
    "TaskId": {
      "Description": "Task ID. Automatically assigned by the system, the user queries the task status.", // タスク ID。システムによって自動的に割り当てられ、ユーザーはタスクステータスを照会します。
      "Value": {
        "Fn::GetAtt": [
          "AnyCluster",
          "TaskId"
        ]
      }
    },
    "ClusterId": {
      "Description": "Cluster instance ID.", // クラスタインスタンス ID。
      "Value": {
        "Fn::GetAtt": [
          "AnyCluster",
          "ClusterId"
        ]
      }
    },
    "ScalingGroupId": {
      "Description": "Scaling group id", // スケーリンググループ ID
      "Value": {
        "Fn::GetAtt": [
          "AnyCluster",
          "ScalingGroupId"
        ]
      }
    },
    "ScalingRuleId": {
      "Description": "Scaling rule id", // スケーリングルール ID
      "Value": {
        "Fn::GetAtt": [
          "AnyCluster",
          "ScalingRuleId"
        ]
      }
    },
    "DefaultUserKubeConfig": {
      "Description": "Default user kubernetes config which is used for configuring cluster credentials.", // デフォルトユーザー Kubernetes 構成。クラスタクレデンシャルの構成に使用されます。
      "Value": {
        "Fn::GetAtt": [
          "AnyCluster",
          "DefaultUserKubeConfig"
        ]
      }
    },
    "WorkerRamRoleName": {
      "Description": "Worker ram role name.", // ワーカー RAM ロール名。
      "Value": {
        "Fn::GetAtt": [
          "AnyCluster",
          "WorkerRamRoleName"
        ]
      }
    },
    "ScalingConfigurationId": {
      "Description": "Scaling configuration id", // スケーリング構成 ID
      "Value": {
        "Fn::GetAtt": [
          "AnyCluster",
          "ScalingConfigurationId"
        ]
      }
    },
    "PrivateUserKubConfig": {
      "Description": "Private user kubernetes config which is used for configuring cluster credentials.", // 非公開ユーザー Kubernetes 構成。クラスタクレデンシャルの構成に使用されます。
      "Value": {
        "Fn::GetAtt": [
          "AnyCluster",
          "PrivateUserKubConfig"
        ]
      }
    },
    "Nodes": {
      "Description": "The list of cluster nodes.", // クラスタノードのリスト。
      "Value": {
        "Fn::GetAtt": [
          "AnyCluster",
          "Nodes"
        ]
      }
    }
  }
}