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

Resource Orchestration Service:ALIYUN::EDAS::K8sSlbBinding

最終更新日:Jan 16, 2025

ALIYUN::EDAS::K8sSlbBinding は、コンテナサービス Kubernetes(ACK)クラスター内のアプリケーションにサーバーロードバランサー(SLB)インスタンスをバインドするために使用されます。

構文

{
  "Type": "ALIYUN::EDAS::K8sSlbBinding",
  "Properties": {
    "Type": String,
    "AppId": String,
    "ClusterId": String,
    "Scheduler": String,
    "Specification": String,
    "LoadBalancerId": String,
    "ServicePortInfos": List
  }
}

プロパティ

プロパティタイプ必須編集可能説明制約
TypeStringはいいいえSLB インスタンスのネットワークタイプ。有効な値:
  • internet:インターネット
  • Intranet:仮想プライベートクラウド(VPC)
AppIdStringはいいいえアプリケーションの ID。なし。
ClusterIdStringはいいいえクラスターの ID。なし。
SchedulerStringいいえいいえスケジューリングアルゴリズム。デフォルト値:rr。有効な値:
  • wrr:重み付きラウンドロビン(WRR)スケジューリングアルゴリズム。重みの大きいバックエンドサーバーは、重みの小さいバックエンドサーバーよりも多くのリクエストを受け取ります。
  • rr:ラウンドロビン(RR)スケジューリングアルゴリズム:リクエストはバックエンドサーバーに順番に配信されます。
SpecificationStringいいえいいえSLB インスタンスの仕様。なし。
LoadBalancerIdStringいいえいいえSLB インスタンスの ID。このプロパティを指定しない場合、Enterprise Distributed Application Service(EDAS)は自動的に SLB インスタンスを購入します。
ServicePortInfosListはいいいえポートに関する情報。複数のポートを設定する場合、または TCP 以外のプロトコルを使用する場合は、このプロパティが必要です。詳細については、ServicePortInfos プロパティをご参照ください。

ServicePortInfos 構文

"ServicePortInfos": [
  {
    "TargetPort": Integer,
    "LoadBalancerProtocol": String,
    "CertId": String,
    "Port": Integer
  }
]

ServicePortInfos プロパティ

プロパティタイプ必須編集可能説明制約
TargetPortIntegerはいいいえバックエンドポート。有効な値:1 ~ 65535。
LoadBalancerProtocolStringはいいいえSLB インスタンスで使用されるプロトコル。有効な値:
  • TCP
  • HTTPS
CertIdStringいいえいいえ証明書の ID。LoadBalancerProtocol プロパティを HTTPS に設定する場合、このプロパティが必要です。
PortIntegerはいいいえフロントエンドポート。有効な値:1 ~ 65535。

戻り値

Fn::GetAtt

  • LoadBalancerName:EDAS で使用される SLB インスタンスの名前。
  • Address:SLB インスタンスの IP アドレス。
  • AppId:アプリケーションの ID。
  • ChangeOrderId:変更プロセスの ID。
  • LoadBalancerId:SLB インスタンスの ID。

JSON 形式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Type": {
      "Type": "String",
      "Description": "SLB インスタンスのタイプ。有効な値:internet および intranet。", // The type of the SLB instance. Valid values: internet and intranet.
      "AllowedValues": [
        "internet",
        "intranet"
      ],
      "Default": "internet"
    },
    "AppId": {
      "Type": "String",
      "Description": "アプリケーションの ID。", // The ID of the application.
      "Default": "5a166fbd-****-****-a286-781659d9f54c"
    },
    "ClusterId": {
      "Type": "String",
      "Description": "クラスターの ID。", // The ID of the cluster.
      "Default": "712082c3-f554-****-****-a947b5cde6ee"
    },
    "ServicePortInfos": {
      "Type": "Json",
      "Description": "ポートに関する情報。", // The information about the ports.
      "MinLength": 1,
      "Default": [
        {
          "TargetPort": 8080,
          "LoadBalancerProtocol": "TCP",
          "Port": 80
        }
      ]
    }
  },
  "Resources": {
    "K8sSlbBinding": {
      "Type": "ALIYUN::EDAS::K8sSlbBinding",
      "Properties": {
        "Type": {
          "Ref": "Type"
        },
        "AppId": {
          "Ref": "AppId"
        },
        "ClusterId": {
          "Ref": "ClusterId"
        },
        "ServicePortInfos": {
          "Ref": "ServicePortInfos"
        }
      }
    }
  },
  "Outputs": {
    "LoadBalancerName": {
      "Description": "EDAS で定義されているロードバランサーインスタンスの名前。", // The name of load balancer instance defined in EDAS.
      "Value": {
        "Fn::GetAtt": [
          "K8sSlbBinding",
          "LoadBalancerName"
        ]
      }
    },
    "Address": {
      "Description": "ロードバランサーインスタンスのアドレス。", // The address of load balancer instance.
      "Value": {
        "Fn::GetAtt": [
          "K8sSlbBinding",
          "Address"
        ]
      }
    },
    "AppId": {
      "Description": "アプリケーションの ID。", // The ID of the application.
      "Value": {
        "Fn::GetAtt": [
          "K8sSlbBinding",
          "AppId"
        ]
      }
    },
    "ChangeOrderId": {
      "Description": "変更プロセスの ID。", // The ID of the change process.
      "Value": {
        "Fn::GetAtt": [
          "K8sSlbBinding",
          "ChangeOrderId"
        ]
      }
    },
    "LoadBalancerId": {
      "Description": "ロードバランサーインスタンスの ID。", // The ID of load balancer instance.
      "Value": {
        "Fn::GetAtt": [
          "K8sSlbBinding",
          "LoadBalancerId"
        ]
      }
    }
  }
}