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 Service Mesh Management permission in the project. For more information, see Project Members and Project Roles.

Steps

  1. Log in to the KubeSphere web console with a user who has Service Mesh Management permissions and enter your workspace.

  2. Click Grayscale Release > Composed Apps in the left navigation pane.

  3. Select a project from the drop-down list in the upper left corner of the page.

  4. On the Composed Apps page, click the name of an app to go to its details page.

  5. On the app details page, click Operation > Add Service.

  6. 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.

  7. On the Basic Information tab, configure the basic information for the service, then click Next.

  8. 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, and then click Next.

  9. On the Storage Settings tab, mount volumes for the containers managed by the service backend workload, then click Next.

  10. 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.