After you create a LoadBalancer service, you can access the service by using a Server Load Balancer (SLB) instance. For access requests from outside the cluster, you can use the domain name of the SLB instance and the service port, or use the IP address of the SLB instance and the service port. For access requests from within the cluster, you can use the service name and the service port. This topic describes how to access services by using SLB instances.
Prerequisites
Background information
Assume that the Cloud Controller Manager (CCM) version of your cluster is 1.9.3 or
later, and you have specified an existing SLB instance for a service. By default,
CCM does not configure listeners for the SLB instance. You can use the annotation
service.beta.kubernetes.io/alibaba-cloud-loadbalancer-force-override-listeners: "true"
to enable CCM to configure listeners for the SLB instance. You can also manually
configure listeners for the SLB instance.
- View the CCM version in the Container Service for Kubernetes (ACK) console.
- Log on to the the ACK console.
- In the left-side navigation pane, click Clusters.
- On the Clusters page, find the specific cluster, and choose in the Actions column of the cluster. The Core Components tab appears on the Add-ons page. You can view the CCM version on the Core Components tab.
- Run the following command to query the CCM version. This method is applicable to dedicated
clusters only.
kubectl get pod -n kube-system -o yaml|grep image:|grep cloud-con|uniq
Use the command-line tool
Method 1:
Method 2:
Use the Dashboard module in the ACK console
Use the ACK console
References
Alibaba Cloud SLB supports a variety of features. For example, you can configure the health check, billing method, and instance type of an SLB instance by setting parameters. For more information, see Use annotations to configure SLB instances.