Rancher implements a managed load balancer using HAProxy that can be manually scaled to multiple hosts. A load balancer can be used to distribute network and application traffic to individual containers by directly adding them or “linked” to a basic service. A basic service that is “linked” will have all its underlying containers automatically registered as load balancer targets by Rancher.
Field | Type | Create | Update | Default | Notes |
---|---|---|---|---|---|
assignServiceIpAddress | boolean | Optional | - | - | |
certificateIds | array[certificate] | Optional | Yes | - | |
defaultCertificateId | certificate | Optional | Yes | - | |
description | string | Optional | Yes | - | |
environmentId | environment | Yes | - | - | |
externalId | string | Optional | - | - | |
launchConfig | launchConfig | Optional | - | - | |
loadBalancerConfig | loadBalancerConfig | Optional | Yes | - | |
metadata | map[json] | Optional | Yes | - | |
name | string | Yes | Yes | - | |
retainIp | boolean | Optional | Yes | - | |
scale | int | Optional | Yes | 1 | |
scalePolicy | scalePolicy | Optional | Yes | - | |
selectorLink | string | Optional | Yes | - | |
startOnCreate | boolean | Optional | - | - | |
vip | string | Optional | - | - |
Field | Type | Notes |
---|---|---|
currentScale | int | |
fqdn | string | |
healthState | string | |
id | int | The unique identifier for the loadBalancerService |
publicEndpoints | array[publicEndpoint] | |
upgrade | serviceUpgrade |
Please read more about the common resource fields. These fields are read only and applicable to almost every resource. We have segregated them from the list above.
CreatePOST: /v1/projects/${PROJECT_ID}/loadBalancerServices
DeleteDELETE: /v1/projects/${PROJECT_ID}/loadBalancerServices/${ID}
UpdatePUT: /v1/projects/${PROJECT_ID}/loadBalancerServices/${ID}
activate
POST: /v1/projects/${PROJECT_ID}/loadBalancerServices/${ID}?action=activate
addservicelink
POST: /v1/projects/${PROJECT_ID}/loadBalancerServices/${ID}?action=addservicelink
Input: AddRemoveLoadBalancerServiceLinkInput
Field | Type | Required | Default | Notes |
---|---|---|---|---|
serviceLink | loadBalancerServiceLink | Yes |
Output: An updated copy of the service resource
cancelrollback
POST: /v1/projects/${PROJECT_ID}/loadBalancerServices/${ID}?action=cancelrollback
cancelupgrade
POST: /v1/projects/${PROJECT_ID}/loadBalancerServices/${ID}?action=cancelupgrade
deactivate
POST: /v1/projects/${PROJECT_ID}/loadBalancerServices/${ID}?action=deactivate
finishupgrade
POST: /v1/projects/${PROJECT_ID}/loadBalancerServices/${ID}?action=finishupgrade
removeservicelink
POST: /v1/projects/${PROJECT_ID}/loadBalancerServices/${ID}?action=removeservicelink
Input: AddRemoveLoadBalancerServiceLinkInput
Field | Type | Required | Default | Notes |
---|---|---|---|---|
serviceLink | loadBalancerServiceLink | Yes |
Output: An updated copy of the service resource
rollback
POST: /v1/projects/${PROJECT_ID}/loadBalancerServices/${ID}?action=rollback
setservicelinks
POST: /v1/projects/${PROJECT_ID}/loadBalancerServices/${ID}?action=setservicelinks
Input: SetLoadBalancerServiceLinksInput
Field | Type | Required | Default | Notes |
---|---|---|---|---|
serviceLinks | array[loadBalancerServiceLink] | No |
Output: An updated copy of the service resource
upgrade
POST: /v1/projects/${PROJECT_ID}/loadBalancerServices/${ID}?action=upgrade
Input: ServiceUpgrade
Field | Type | Required | Default | Notes |
---|---|---|---|---|
inServiceStrategy | inServiceUpgradeStrategy | No | ||
toServiceStrategy | toServiceUpgradeStrategy | No |
Output: An updated copy of the service resource