Namespaces are logically isolated from each other to simplify the service calls and distributed configuration pushes of applications. If you use multiple environments, such as the development environment, test environment, and production environment, we recommend that you use namespaces to improve application security. Serverless App Engine (SAE) provides a default namespace in each region. You cannot modify or delete the default namespace. To manage applications in different environments in a fine-grained manner, you can create custom namespaces based on your business requirements.
Create a custom namespace
Log on to the SAE console.
In the left-side navigation pane, click Namespaces. In the top navigation bar, select a region. Then, click Create Namespace.
In the Create Namespace panel, configure the parameters and click OK. The following table describes the parameters.
Parameter
Description
Namespace Name
Enter a name for the namespace.
Namespace ID
Prefix: You cannot change the prefix. The prefix is generated based on the selected region.
Suffix: You can change the suffix. You can specify a custom suffix.
Region
You cannot change the region.
Description
Enter a description for the namespace.
After a namespace is created, you can view the namespace details on the Namespaces page.
View the basic information about a namespace
Log on to the SAE console.
In the left-side navigation pane, click Namespaces. In the top navigation bar, select a region. Then, click the name of a namespace.
Optional. On the Resource Information tab of the Namespace Details page, click the value that is displayed below Applications. On the Applications page, view all applications in the namespace.
View the change records of a namespace
Log on to the SAE console.
In the left-side navigation pane, click Namespaces. In the top navigation bar, select a region. Then, click the name of a namespace.
In the left-side navigation pane, click Change Records to view the change records of the namespace, such as the application change time, change type, and change status.
Optional. Find the change record that you want to view and click View in the Actions column.
Modify a custom namespace
To change the name and description of a namespace, click Modify in the Actions column of the namespace on the Namespaces page.
Delete a custom namespace
To delete a namespace that you no longer use, click Delete in the Actions column of the namespace on the Namespaces page. In the message that appears, click Confirm.
If you delete a namespace, the applications in the namespace cannot run after you deploy the applications again.
Change the virtual private cloud (VPC) of a namespace
Log on to the SAE console.
In the left-side navigation pane, click Namespaces. In the top navigation bar, select a region. Then, click the name of a namespace.
On the Basic Information tab of the Namespace Details page, click Switch VPC.
NoteSwitch VPC is displayed only after you create the first application for the namespace and associate the application with a VPC. Before you switch to another VPC, make sure that no applications exist in the namespace. For more information, see Create an application.
In the Switch VPC dialog box, select the VPC that you want to use and click OK.
View the event information of a namespace
On the Event Information page of a namespace, you can view the events of the applications in the namespace. This helps you identify errors.
Log on to the SAE console.
In the left-side navigation pane, click Namespaces. In the top navigation bar, select a region. Then, click the name of a namespace.
In the left-side navigation pane, click Event Information. On the Event Information page, specify search conditions.
The following item list describes the search conditions that you can configure:
Source Type: Select Application (Deployment), Application Instance (Pod), SLB (Service), Auto Scaling (HorizontalPodAutoscaler), Gateway Routing (Ingress), or Application (CloneSet).
Event Level: Select Warning or Normal. Pay attention to Warning-level events.
Source Name: Enter an event source name, such as an application name or an application instance name.
Event Cause: Enter the cause of an event, such as FailedScheduling for a pod.