Add a Service to a Composed App
This section describes how to add a stateful or stateless service to a composed app.
Prerequisites
You need to join a project and have the App Instance 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 App Instance Management permissions and enter your workspace.
-
Click Application Workloads > Composed Apps in the left navigation pane.
-
Select a project from the drop-down list in the upper left corner of the page.
-
On the Composed Apps page, click the name of an app to go to its details page.
-
On the app details page, click Operation > Add Service.
-
In the Create Service dialog box, select Stateful Service or Stateless Service as needed.
Note -
Stateful Service: The service’s internal access mode is Headless, and the backend workload is a StatefulSet.
-
Stateless Service: The service’s internal access mode is VirtualIP, and the backend workload is a Deployment.
-
-
On the Basic Information tab, configure the basic information for the service, then click Next.
-
On the Pod Settings tab, configure the number of replicas, containers, update strategy, security context, scheduling rules, and metadata for the pods managed by the service’s backend workload, then click Next.
-
On the Storage Settings tab, mount volumes for the containers managed by the service backend workload, then click Next.
-
On the Advanced Settings tab, specify nodes for the pods managed by the service backend workload, configure the service’s external access mode, session affinity settings, and metadata, then click Create. After creation, the service will be displayed in the service list.
For parameter settings of Stateful Service and Stateless Service, refer to Create a Stateful or Stateless Service.