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
}
}プロパティ
| プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
| Type | String | はい | いいえ | SLB インスタンスのネットワークタイプ。 | 有効な値:
|
| AppId | String | はい | いいえ | アプリケーションの ID。 | なし。 |
| ClusterId | String | はい | いいえ | クラスターの ID。 | なし。 |
| Scheduler | String | いいえ | いいえ | スケジューリングアルゴリズム。 | デフォルト値:rr。有効な値:
|
| Specification | String | いいえ | いいえ | SLB インスタンスの仕様。 | なし。 |
| LoadBalancerId | String | いいえ | いいえ | SLB インスタンスの ID。 | このプロパティを指定しない場合、Enterprise Distributed Application Service(EDAS)は自動的に SLB インスタンスを購入します。 |
| ServicePortInfos | List | はい | いいえ | ポートに関する情報。複数のポートを設定する場合、または TCP 以外のプロトコルを使用する場合は、このプロパティが必要です。 | 詳細については、ServicePortInfos プロパティをご参照ください。 |
ServicePortInfos 構文
"ServicePortInfos": [
{
"TargetPort": Integer,
"LoadBalancerProtocol": String,
"CertId": String,
"Port": Integer
}
]ServicePortInfos プロパティ
| プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
| TargetPort | Integer | はい | いいえ | バックエンドポート。 | 有効な値:1 ~ 65535。 |
| LoadBalancerProtocol | String | はい | いいえ | SLB インスタンスで使用されるプロトコル。 | 有効な値:
|
| CertId | String | いいえ | いいえ | 証明書の ID。 | LoadBalancerProtocol プロパティを HTTPS に設定する場合、このプロパティが必要です。 |
| Port | Integer | はい | いいえ | フロントエンドポート。 | 有効な値: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"
]
}
}
}
}