Accessing an Application Instance Deployed in PPaaS
In PPaaS, the backend members in the instances, such as in a Virtual Machine (VM) setup the VM instances and in a Kubernetes setup the Docker instances, are fronted by a Load Balancer. The proxyPort
property is used to define the port of the Load Balancer. When the Load Balancer receives traffic, it will route the traffic to the members (worker nodes) in the respective clusters, based on their resource availability.
PPaaS uses a Proxy Service for Kubernetes as there are different service port types with different port ranges. Therefore, when using Kubernetes, 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:
The URL to access a service depends on the port mapping (VM) and port range (Docker) that you defined in the cartridge definition and the Kubernetes cluster definition respectively.
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.
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:vim /etc/hosts/
Map all the hostnames against the available LB IPs in the
/etc/hosts/
file and save the file.<LB_IP> <HOSTNAME>
Example:172.17.8.103 wso2as-521-application.mgt.as.wso2.org
Each LB IP can have more than one hostname mappings. However, these mappings need to be defined separately in the
/etc/hosts/
file.
Optionally, add domain mapping if required.
Use the following URL format to access the WSO2 service (e.g., the ESB service):