Edit Service Settings
This section explains how to edit service settings.
Prerequisites
You should join a cluster and have the Application Workload Management permission within the cluster. For more information, refer to “Cluster Members” and “Cluster Roles”.
Steps
Log in to the KubeSphere web console with a user who has the Application Workload Management permission, and access your cluster.
Click Application Workloads > Services in the left navigation pane.
Click on the right of the service you want to edit, then choose Edit Service from the dropdown list.
In the Edit Service dialog, modify the service settings, then click OK.
For services with an internal access mode of ExternalName, you can modify the address of the external service.
For other services, you can modify the internal access mode, workload selector, and ports of the service.
Parameter Description Internal Access Mode
The way to access the service within the cluster.
Internal Domain Name: The system does not assign a virtual IP address to the service. It can be accessed internally by using the format
<service name>.<namespace>.svc.cluster.local
or<service name>.<namespace>
.Virtual IP Address: The system assigns a virtual IP address to the service for internal access within the cluster. It also supports access internally by using the format
<service name>.<namespace>.svc.cluster.local
or<service name>.<namespace>
.
Workload Selector
Specify the workloads with specific labels to which the service routes business traffic.
Manually set selectors by entering the key and value of a label. Click Add to set multiple labels.
Manually select workloads by clicking Specify Workload.
Click on the right side of a created label to delete it.
Ports
Map service ports and their corresponding container ports.
Protocol: The protocol that the application in the target container actually listens on. To use the application governance features provided by KubeSphere, ensure that the protocol selected here matches the one the application in the target container actually listens on.
Name: The name of the service port. The application governance features of KubeSphere require the service port name to have the protocol name in lowercase as a prefix. To use the application governance features provided by KubeSphere, use the lowercase protocol name as the prefix for the port name (e.g., http-).
Container Port: The port number on which the application in the target container actually listens.
Service Port: The port number of the service.
Click Add to set multiple service ports. Click on the right side of a created service port to delete it.