In PPaaS, the backend members in the instances (such as, in a VM setup the VM instances will be fronted by a Load Balancer in PPaaS. Whereas, in Kubernetes and in a Kubernetes setup the Docker instances will be ) are fronted by a proxy service, which is created for each service clusterLoad Balancer with the use of proxies. The proxyPort property is used to define the port of the Load Balancer. When the Load Balancer or the Proxy service receive receives application traffic, it will route the traffic to the members (worker nodes) in the respective clusters, based based on their resource availability.
PPaaS uses a Proxy Service for Kubernetes as there are different service port types with different port ranges. Therefore, in a Kubernetes setup you need to set the proxyPort to zero in the Cartridge definition and define the Kubernetes proxy service port range as 30000 - 32767 using the portRange
property in the Kubernetes cluster definition.
Follow the instructions below to access the WSO2 service:
Note | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Identify the Load Balancer IP and the hostname of the each of the clusters that are available in the deployed application.
For more information, see Getting the Runtime Topology of an Application.
Map the cluster hostname with one of the Load Balancer IPs.Anchor step2 step2
Each Load Balancer IP refers to the IP of a node.Open the /etc/hosts/ file.
Example:
If you are using Vim, which is a text editor, you can open the file in the terminal as follows:Code Block vim /etc/hosts/
Define mapping for all the hostnames against the available LB IPs in the
/etc/hosts/
file and save the file.<LB_IP> <HOSTNAME>
Example:Code Block 172.17.8.103 wso2as-521-application.mgt.as.wso2.org
Info Each LB IP can have more than one hostname mappings. However, these mappings need to be defined separately in the
/etc/hosts/
file.
Use the following URL format to access the WSO2 service (e.g., the ESB service):
Localtabgroup Localtab active true title EC2 Panel Code Block http://<INSTANCE_HOSTNAME>:<LB_PROXY_PORT>/<CONTEXT_PATH>
<LOAD_BALANCER_IP>
- This will refer to the Load Balancer IP to which the cluster hostname was mapped to as explained in step 2.<LB_PROXY_PORT>
- The LB proxy port to which the port was mapped to as explained in Prerequisites.
Example:Code Block http://wso2as-521-application.mgt.as.wso2.org:80/index.php
Localtab title Kubernetes Panel Code Block http://<LOAD_BALANCER_IP>:<PROXY_SERVICE_PORT>/<CONTEXT_PATH>
<LOAD_BALANCER_IP>
- This will refer to the Load Balancer IP to which the cluster hostname was mapped to as explained in step 2.<PROXY_SERVICE_PORT>
- When using Kubernetes, you need to define the Kubernetes proxy service port range as 30000 - 32767 in the Kubernetes cluster definition, as there are different service port types with different port ranges in Kubernetes. Therefore, when using Kubernetes, the first proxy service that gets created will be assigned to port 30000, and the subsequent proxy services that get created will be assigned port values in order incrementally. Port ranges are not applicable when using PPaaS on Virtual Machines.
Example:
Code Block http://172.17.8.103:30000/index.php
Info Currently, it is not possible to query auto generated Kubernetes proxy service ports via the Stratos API. However, they can be found on the PPaaS server log.