You need to enable JavaScript to run this app.
Code Pipeline

Code Pipeline

Copy page
Download PDF
Access methods
Add Service
Copy page
Download PDF
Add Service
Add a ClusterIP type Service for the application to enable other Kubernetes applications within this cluster to access the current application. This article explains how to add the Service.​
Prerequisites​
A managed application has been created and deployed, and the application must be deployed in a Volcengine Kubernetes Engine (VKE) cluster. For specific operations, refer to Create and deploy managed applications (JAR / WAR).​
Procedure​
  1. Log in to the application management page.​
  1. Log in to Code Pipeline Console.​
  1. Select workspace in the left navigation bar.​
  1. Click the name of the target workspace to enter that workspace.​
  1. In the left navigation bar, select Application Delivery > Application Management.​
  1. On the application management page, select the target hosted application, click the application card, and go to the Basic Information tab for the current application.​
  1. Switch to the application orchestration tab, and in the access method settings section, select Service > Add Service.​
  1. In the Add Service dialog box, set the Service parameters.​
  • ​
    Configuration Item​
    Descriptions​
    Service name​
    A custom service name.​
    warning​
    Service names must be unique within the namespace of the deployed cluster.​
    Service type​
    This scenario is intra-cluster access (ClusterIP), which means that the service can be accessed by other applications within the cluster.​
    Port mapping​
    Configure port mapping rules. Support configuration of multiple port mappings.​
    tip​
    • Multiple port mappings are commonly used in scenarios where an application defines multiple ports to distinguish between different features. For example: one port is used for business access, and another port is used for debugging.​
    • When adding multiple port mappings, duplicate ports are not allowed.​
    • Select a communication protocol: TCP or UDP are supported.​
    • Port: Set the port that the process listens on, usually defined by the program. Here, the service port is the same as the container port.​
    ​
  1. Click Confirm. The Service is being created.​
tip​
Supports configuring multiple Services for an application as needed.​
Result validation​
  1. View the Service port mapping in the table: <ClusterIP>:<Port number>.​
  1. Manage your cluster with Kubectl. For specific operations, refer to Connect to cluster.​
  1. Log in to any instance of this cluster and verify whether the application can be successfully accessed via <ClusterIP>:<Port number>.​
​
# Log in to any instance​
kubectl exec -ti <your-pod-name> -n <your-namespace> -- /bin/sh​
​
# Take a web application as an example: use the curl command to verify whether the application is accessible; if everything works normally, it will return the content of the application's homepage.​
curl 172.XX.XX.XX:8080​
​
Related Operations​
For an existing Service, you can modify port mapping information and delete the Service.​
​
Feature​
Descriptions​
Modify a service​
Select the target Service. In the Actions column, click edit to modify the relevant information.​
Delete service​
Select the target Service. In the Actions column, click Delete to delete the current Service.​
danger​
After you delete the Service, other applications in the cluster will no longer be able to access your application through the current service port. Proceed with caution!​
​
​
Last updated: 2025.09.10 17:37:26