Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

...

Note

Anchor
pre
pre
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.

Expand
titleClick here for more information...

When creating the dependent artifacts that are needed to deploy an application, you need to define port mapping in the cartridge definition JSON for each port that is being used with the WSO2 product cartridge. 
The following examples illustrate how to set unique proxy ports for each port that is used with the cartridge.

Localtabgroup
Localtab
activetrue
titleEC2
Code Block
titleExample for defining proxy ports in the cartridge definition
 "portMapping": [
        {
            "name": "mgt-http",
            "protocol": "http",
            "port": 9763,
            "proxyPort": 80
        },
        {
            "name": "mgt-https",
            "protocol": "https",
            "port": 9443,
            "proxyPort": 443
        }
    ],
Localtab
titleKubernetes
Code Block
titleExample for defining proxy ports in the Cartridge definition
 "portMapping": [
        {
            "name": "mgt-http",
            "protocol": "http",
            "port": 9763,
            "proxyPort": 0,
            "kubernetesPortType": "NodePort"
        },
        {
            "name": "mgt-https",
            "protocol": "https",
            "port": 9443,
            "proxyPort": 0,
            "kubernetesPortType": "NodePort"
        }
    ],
  • kubernetesPortType - The Kubernetes port type to which the cartridge is mapped.

    Info

    The following can be assigned for the Kubernetes port type:

    • NodePort -  If this value is used, it will create a service which can be accessed from the outside with port range of 30,000 to 32,767.
    • ClusterIP - If this value is used, the service that gets created will not be exposed to the outside. This is useful if you don't want to expose a service to outside, but need to maintain internal communication within Docker containers.

    Access URLs are generated only for the NodePort service type.

     

Code Block
titleDefining the portRange in the Kubernetes cluster definition
 "portRange": {
        "upper": "32767",
        "lower": "30000"
    },

...