Configuring the Port for Other Components in the Environment to Access the Component
Scenarios
If a component needs to be called by other services or monitoring or O&M tools in the microservice cluster, you must configure ports to ensure that the component can be accessed by external systems.
This section describes how to configure the ports for other components in the environment to access the component. After configuration, log in to the cluster node and run the curl command to access the component.
Constraints
This function is available only in CN North-Beijing4, CN South-Guangzhou, CN East-Shanghai1, ME-Riyadh, TR-Istanbul, AF-Johannesburg, LA-Mexico City2, and LA-Sao Paulo1.
Prerequisites
You have created an application and component.
Adding a Port Configuration
- Log in to CAE.
- Choose Component Configurations.
- Select the target component from the drop-down list in the upper part of the page.
- Click Edit in the Access Mode module.
- In the Access Component from Other Components in the Environment area, click Add Configuration and set parameters by referring to Table 1. To add more port configurations, click Add Port.
Table 1 Configuring private network access Parameter
Description
Protocol
TCP.
Listening Port
Listening port of program in a component, which is obtained from the user program code.
Value range: 1 to 65535.
Access Port
Port provided by a component for external access, which is set by user and must be unique.
Value range: 1 to 65535.
- Click OK.
- Make the configurations take effect.
- If the component has been deployed, click Activate Settings in the upper part of the page. In the dialog box displayed on the right, confirm the configurations and click OK for the configurations to take effect.
- If the component has not been deployed, click Set and Deploy Component in the upper part of the page. In the dialog box displayed on the right, click OK. After the deployment is complete, the configurations take effect.
- (Optional) After the configuration, you can modify or delete the port configuration on the access mode page. After the modification or deletion, click Activate Settings in the upper part of the page for the configuration to take effect.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot