A workload can be accessed from public networks through a load balancer. LoadBalancer provides higher reliability than EIP-based NodePort because an EIP is no longer bound to a single node. The LoadBalancer access type is applicable to the scenario in which a Service exposed to public networks is required.
The LoadBalancer access address consists of the IP address and port number of the public network ELB, for example, 10.117.117.117:80.
Log in to the CCE console or use kubectl to query the IP address of the pod. Then, log in to the node or container in the cluster and run the curl command to manually call the API. Check whether the expected result is returned.
If <container IP address>:<port> cannot be accessed, you are advised to log in to the application container and access <127.0.0.1>:<port> to locate the fault.
Common issues:
Only NodePort or LoadBalancer Services can be accessed using the node IP address and node port.
The access port of a node is the port exposed externally by the node.
You can view the node port of a LoadBalancer Service by editing the YAML file.
Example:
nodePort: 30637 is the port exposed externally by the node, targetPort: 80 is the port exposed by the container, and port: 123 is the port exposed by the ELB.
After finding the node port, access <IP address>:<port> of the node where the container is located and check whether the expected result is returned.
Common issues:
There are several possible causes if <IP address>:<port> of the ELB cannot be accessed, but <IP address>:<port> of the node can be accessed.
Possible causes:
Common issues: