Edit Service External Access Settings
This section describes how to edit the service external access settings.
| Note |
|---|
This operation is only supported for services with the internal access mode set to VirtualIP. It is not supported for services with the internal access modes Headless or ExternalName. |
Prerequisites
You need to join a project and have the Application Workload Management permission in the project. For more information, see Project Members and Project Roles.
Steps
-
Log in to the KubeSphere web console with a user who has Application Workload Management permissions and enter your workspace.
-
Click Application Workloads > Service in the left navigation pane.
-
Select a project from the drop-down list in the upper left corner of the page.
-
On the right side of the service you need to operate, click
, then select Edit External Access from the dropdown list.
-
In the Edit External Access dialog box, set the external access mode for the service, then click OK.
The external access modes for a service include the following types:
Parameter Description None
The service cannot be accessed from outside the cluster.
NodePort
The system maps a node’s port to the service port, allowing access to the service via the node’s IP address and the node port.
LoadBalancer
The system allocates an external IP address for the service based on a NodePort service and binds the external IP address to an external load balancer. The external load balancer listens on the node port corresponding to the service, enabling access to the service via the external IP address. To achieve this functionality, a LoadBalancer type service requires support from a load balancer plugin and the underlying infrastructure environment, and relevant annotations need to be set. For more information, please contact your infrastructure environment provider.