Configure application access modes

For more information about application access modes see "Access mode."

Configure access modes for container applications

Configure a service

Add a service

Services are a load balancing technology of Kubernetes. You can use services to expose the ports of an application to external networks.

To add a service:

  1. On the top navigation bar, click Business Apps, and then select Applications from the App Management menu. Or, on the top navigation bar, click Business Apps, select Application Groups from the App Management menu, and then click an application group name.

  1. Click an application name.

  1. Select the Access tab.

  1. Click Add Service.

  1. Configure the service parameters, and then click OK.

Table-1 Configuring service parameters

Parameter

Description

Service Name

The system automatically generates a service name, which is appended to the application name. You can also modify the system-generated service name.

Access

Port Mappings

Configure port mappings for accessing the application from outside or within the container cluster or MCP cluster.

Note:

Follow these restrictions to ensure correct monitoring and authentication:

·          When you configure port mappings for Istio applications with HTTP access enabled, make sure the port mapping names start with http-.

·          If HTTPS access is enabled for the Istio applications, make sure the port mapping names start with https-.

Sticky Sessions

Select whether to enable sticky sessions, which enable a pod to respond to all requests from the same IP address within the session timeout.

 

Stateful applications can provide headless services, that is, generate a domain name for each pod and do not use load balancing to provide services. Each stateful application can have only one headless service.

 

Delete a service

Deleting a service also deletes the application domain name associated with the service.

 

  1. On the top navigation bar, click Business Apps, and then select Applications from the App Management menu. Or, on the top navigation bar, click Business Apps, select Application Groups from the App Management menu, and then click an application group name.

  1. Click an application name.

  1. Select the Access tab.

  1. Click Delete for a service.

  1. Click OK.

Configure an application domain name

Add an application domain name

An application can have only application domain name. An added application domain name cannot be deleted and can only be edited.

  1. On the top navigation bar, click Business Apps, and then select Applications from the App Management menu. Or, on the top navigation bar, click Business Apps, select Application Groups from the App Management menu, and then click an application group name.

  1. Click an application name.

  1. Select the Access tab.

  1. Click Application Domain Name.

  1. Click Add.

  1. Configure the domain name parameters, and then click OK.

Table-2 Configuring application domain name parameters

Parameter

Description

Domain Name

Enter a domain name for external access, btv.com for example.

Bind Instance

Bind an Ingress Controller instances created in the cloud container engine.

You can bind Ingress Controller instances only for container images deployed on an exclusive cluster. For more information about Ingress Controller, see "Managing Nginx Ingress Controller instances."

For a container cluster that uses Kubernetes 1.23 or a later version, this field is optional and you can enter an instance in this field.

Service

Select a service created in "Add a service."

Internal Port

Configure the port number of the application.

An external application accesses the application through the configured port.

Load Balancing

Select a load balancing algorithm:

  • Round Robin—Requests are distributed evenly across the endpoints, with endpoint weights taken into consideration.

  • Least Connections—A request is sent to the endpoint with the least number of active connections.

  • IP Hash—The endpoint to which a request is sent is determined from the client IP address.

Secure Routes

Enable HTTPS access mode.

Sticky Sessions

Enable a pod to respond to all requests from the same client.

 

Edit an application domain name

  1. On the top navigation bar, click Business Apps, and then select Applications from the App Management menu. Or, on the top navigation bar, click Business Apps, select Application Groups from the App Management menu, and then click an application group name.

  1. Click an application name.

  1. Select the Access tab.

  1. Click Application Domain Name.

  1. Click Edit.

  1. Edit the domain name parameters, and then click OK.

Configure an app access path

  1. On the top navigation bar, click Business Apps, and then select Applications from the App Management menu. Or, on the top navigation bar, click Business Apps, select Application Groups from the App Management menu, and then click an application group name.

  1. Click an application name.

  1. Select the Access tab.

  1. Click App Access Path.

  1. Configure an app access path, and then click OK. You can use IP (or domain);port number/path to access the application.

Configure a network policy

In a network policy, you can specify which remote applications can access the container port. You can specify a custom network whose addresses can access the container port. You can also specify an excluded network within the custom network. Addresses in the excluded network cannot access the container port.

Add a network policy

  1. On the top navigation bar, click Business Apps, and then select Applications from the App Management menu. Or, on the top navigation bar, click Business Apps, select Application Groups from the App Management menu, and then click an application group name.

  1. Click an application name.

  1. Select the Access tab.

  1. Click Network Policy.

  1. Enable Container Network Policy. This option is disabled by default, and any applications can access the application.

  1. Click Add Rule.

  1. Configure the rule parameters, and then click OK.

Table-3 Configuring network policy parameters

Parameter

Description

Direction

Only the Inbound direction is supported.

Protocol

Select a protocol. Options include TCP and UDP.

Container Port

Specify a port for other applications to access the application.

  • If the Service access mode is configured, you can enter a container port created in the Service.

  • If the Service access mode is not configured, you can enter any port. Other applications can access the application through the pod IP and container port.

Select Remote

Select the application groups or applications that can access the application.

Custom Network

Specify a custom network. Addresses in the network can access the container port.

Excluded Network

Specify an excluded network. Addresses in the network cannot access the container port.

 

Add a network policy

  1. On the top navigation bar, click Business Apps, and then select Applications from the App Management menu. Or, on the top navigation bar, click Business Apps, select Application Groups from the App Management menu, and then click an application group name.

  1. Click an application name.

  1. Select the Access tab.

  1. Click Network Policy.

  1. Click the Delete icon for the network policy to be deleted,.

  1. On the dialog box that opens, click OK.

Configure access modes for host applications

Configure an access mode

  1. On the top navigation bar, click Business Apps, and then select Applications from the App Management menu. Or, on the top navigation bar, click Business Apps, select Application Groups from the App Management menu, and then click an application group name.

  1. Click an application name.

  1. Select the Access tab.

  1. Click Access Mode.

  1. Click Edit.

  1. Configure the access mode parameters, and click OK.

Table-4 Configuring access mode parameters

Parameter

Description

Not Configure

Use the host IP address and application port to access applications.

Application Domain Name

Use the domain name to access an application.

  • Domain Name: Configure a domain name, for example, example.com.

  • Load Balancing Policy:

  • Round Robin: Assigns requests to endpoints according to their weights.

  • Least Connections: Assigns requests to the endpoint with the least number of connections.

  • IP Hash: Assigns requests to endpoints based on the hash of source IP addresses.

  • Enable Secure Routes: Select this option to enable HTTPS access mode.

Enable Sticky Sessions: Select this option to enable a pod to respond to all requests from the same client.

IaaS Load Balancing

Use the virtual IP address of a load balancer and the listening port of a listener to access an application.

  • Load Balancer: Select an existing load balancer or click Create to create a load balancer. If you select an existing load balancer and an existing listener, the system automatically adds the selected VMs to the server farm of the listener. Therefore, the real servers in the server farm have been deployed with the same applications.

  • Listener: Select a listener.

  • LB Algorithm:

  • Weighted Round Robin: Assigns new connections to real servers based on their weight values. A real server with a greater weight value is assigned more connections.

  • Weighted Least Connections: Always assigns user requests to the real server with the fewest number of weighted active connections (the total number of active connections divided by weight).

  • Source Address: Distributes user requests to different real servers according to the source IP address. User requests with the same source IP address can be distributed to the same real server.

  • Sticky Sessions: Enable this option to distribute all requests from the same user to the same real server.

  • APP_COOKIE: Use APP cookies to discriminate clients. Requests with the same APP cookie are sent to the same real server.

  • HTTP_COOKIE: Use HTTP cookies to discriminate clients. The system adds a cookie to the HTTP response of the first request sent by a client, Subsequent requests with the same HTTP cookie are sent to the same real server.

  • SOURCE_IP: Distribute user requests to different real servers according to the source IP address. User requests with the same source IP address can be distributed to the same real server.

Cookie Name

Enter a cookie name, a string of 1 to 32 characters. The name cannot start or end with a dot (.) and cannot contain full-width characters (except Chinese words) or the following special characters: \ /*?"<>|

 

Configure an app access path

  1. On the top navigation bar, click Business Apps, and then select Applications from the App Management menu. Or, on the top navigation bar, click Business Apps, select Application Groups from the App Management menu, and then click an application group name.

  1. Click an application name.

  1. Select the Access tab.

  1. Click App Access Path.

  1. Configure an app access path, and then click OK. You can use IP (or domain);port number/path to access the application.