ALIYUN::EDAS::K8sSlbBinding is used to bind a Server Load Balancer (SLB) instance to an application in a Container Service for Kubernetes (ACK) cluster.
Syntax
{
"Type": "ALIYUN::EDAS::K8sSlbBinding",
"Properties": {
"Type": String,
"AppId": String,
"ClusterId": String,
"Scheduler": String,
"Specification": String,
"LoadBalancerId": String,
"ServicePortInfos": List
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Type | String | Yes | No | The network type of the SLB instance. | Valid values:
|
AppId | String | Yes | No | The ID of the application. | None. |
ClusterId | String | Yes | No | The ID of the cluster. | None. |
Scheduler | String | No | No | The scheduling algorithm. | Default value: rr. Valid values:
|
Specification | String | No | No | The specification of the SLB instance. | None. |
LoadBalancerId | String | No | No | The ID of the SLB instance. | If you do not specify this property, Enterprise Distributed Application Service (EDAS) automatically purchases an SLB instance. |
ServicePortInfos | List | Yes | No | The information about the ports. This property is required if you configure multiple ports or use a protocol other than TCP. | For more information, see ServicePortInfos properties. |
ServicePortInfos syntax
"ServicePortInfos": [
{
"TargetPort": Integer,
"LoadBalancerProtocol": String,
"CertId": String,
"Port": Integer
}
]
ServicePortInfos properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
TargetPort | Integer | Yes | No | The backend port. | Valid values: 1 to 65535. |
LoadBalancerProtocol | String | Yes | No | The protocol that is used by the SLB instance. | Valid values:
|
CertId | String | No | No | The ID of the certificate. | This property is required when you set the LoadBalancerProtocol property to HTTPS. |
Port | Integer | Yes | No | The frontend port. | Valid values: 1 to 65535. |
Return values
Fn::GetAtt
- LoadBalancerName: the name of the SLB instance that is used in EDAS.
- Address: the IP address of the SLB instance.
- AppId: the ID of the application.
- ChangeOrderId: the ID of the change process.
- LoadBalancerId: the ID of the SLB instance.
Examples
JSON
format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Type": {
"Type": "String",
"Description": "The type of the SLB instance. Valid values: internet and intranet.",
"AllowedValues": [
"internet",
"intranet"
],
"Default": "internet"
},
"AppId": {
"Type": "String",
"Description": "The ID of the application.",
"Default": "5a166fbd-****-****-a286-781659d9f54c"
},
"ClusterId": {
"Type": "String",
"Description": "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": "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": "The ID of the application.",
"Value": {
"Fn::GetAtt": [
"K8sSlbBinding",
"AppId"
]
}
},
"ChangeOrderId": {
"Description": "The ID of the change process.",
"Value": {
"Fn::GetAtt": [
"K8sSlbBinding",
"ChangeOrderId"
]
}
},
"LoadBalancerId": {
"Description": "The ID of load balancer instance.",
"Value": {
"Fn::GetAtt": [
"K8sSlbBinding",
"LoadBalancerId"
]
}
}
}
}