Create a Composed App
This section describes how to create a composed app in a federated project.
You can customize the services, workloads, and routes of an application to create a composed app. Compared to template-based applications, composed apps support application governance. You can enable application governance for composed apps to use traffic monitoring, canary release, and tracing features.
Prerequisites
-
The Federated Cluster App Management extension must be installed and enabled on the KubeSphere platform.
-
To enable application governance features for the app, the KubeSphere Service Mesh extension must be installed and enabled on the KubeSphere platform.
-
You need to join a federated project and have the Federated Project Management permission in the corresponding workspace.
Steps
-
Log in to the KubeSphere web console as a user with Federated Project Management permissions and enter your federated project.
-
Click Application Workloads > Apps in the left navigation pane.
-
On the Apps page, click Create.
-
On the Basic Information tab, configure the basic information for the app, then click Next.
Parameter Description Name
The name of the application. The name can only contain lowercase letters, numbers, and hyphens (-), must start and end with a lowercase letter or number, and has a maximum length of 63 characters.
Version
The user-defined version of the application. The version can only contain lowercase letters and numbers, with a maximum length of 16 characters.
Application Governance
Whether to enable the "Application Governance" feature for the application. After enabling application governance, you can use traffic monitoring, canary release, and tracing features for the application.
Description
The description information of the application. The description can contain any characters, with a maximum length of 256 characters.
-
On the Service Settings tab, click Create Service, select Stateful Service or Stateless Service to create a service for the app, then click Next.
-
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.
Note For more information, please refer to Create a Stateful or Stateless Service.
-
-
On the Routing Settings tab, click Add Routing Rule to create a routing rule for the app, then click Create.
-
In the Cluster area, select one or more clusters where the project is located. You can add routing rules for applications in the specified clusters.
-
Click Add Routing Rule to set a routing rule. You can set multiple routing rules, each corresponding to a domain name.
-
Hover over a created routing rule, then click
on the right to edit the routing rule settings.
-
Hover over a created routing rule, then click
on the right to delete the routing rule.
Parameter Description Domain Name
User-defined domain name.
Protocol
Protocol supported by the Ingress. The parameter value can be HTTP or HTTPS.
Secret
When the Ingress protocol is HTTPS, the Secret used to provide the certificate and key. This Secret must contain the tls.cert and tls.key fields, storing the Base64-encoded certificate and private key respectively.
Path
Domain path and its mapping relationship with the service port.
-
Click Add to set multiple paths.
-
Click
on the right of a created path to delete the path.
After the app is created, it will be displayed on the app list page.
-