After you deploy an application to SAE, you can manage its instance lifecycle. You can scale, restart, or delete instances, and view their events and logs.
Procedure
Log on to the SAE console. In the navigation pane on the left, choose . Select the desired region and namespace, and then click the application's ID.
On the Basic Information page of the application, click the Instances tab.
You can also click Details in the Actions column for a desired instance on the Instances tab.
Inspect instance details
On the Instances tab, click the ID of the desired instance.
View instance events
You can also click the
icon in the Actions column for a desired instance on the Instances tab, and then click Event to view events for the instance's main application container and any Sidecar containers.
You can view two levels of events on this page.
Warning: Alert events.
Normal: Normal events.
The Events page displays the container runtime status and CPU monitoring charts. The charts mark key event nodes, including Resource scheduling, Instance preparing, Start pulling image, Image pull finished, Container process started, and Container running. Event records are kept for seven days. You can use the Select event level drop-down list to filter events by level.
View real-time logs
Click the Log tab to view the real-time logs from the main container and any Sidecar container.
SAE displays up to 500 of the most recent log entries. If you need to view more logs, you can use the file log feature. For more information, see View file logs.
You can select a refresh frequency in the Real-time Log Refresh Frequency area. SAE supports 5s, 10s, 15s, and Do Not Refresh.
By default, the real-time logs of the main application container are displayed. You can select the real-time logs of a specific Sidecar container from the drop-down list corresponding to the main application container.
You can also go to the Container tab and click Real-time Logs in the Actions column for the main application container or a Sidecar container.
You can also go to the Instances tab and click Real-time Logs in the Actions column for the desired instance.
Real-time logs consist of the standard output (stdout) from the container. You can also collect logs by using Log Service (SLS) or log on to the container by using Webshell to view more log content.
Log on to an instance
Click the Webshell tab to log on to the desired instance.
By default, you are logged on to the main application container. You can click the drop-down list corresponding to the main container and select a Sidecar container to log on to it.
You can also go to the Container tab and click Webshell in the Actions column for the main application container or a Sidecar container to log on.
You can also go to the Instances tab and click Webshell in the Actions column for the desired instance to log on.
Restart instances
On the Instances tab, click . In the Restart Instance dialog box that appears, click OK.
Restarting an instance may take some time.
Restarting an instance only restarts its business containers, not the instance itself.
Restarting an instance will interrupt your service. Perform this action during off-peak hours.
Batch restart application instances:
Select the checkboxes next to the instances you want to restart, and then click Batch Restart Instances. In the Restart Instance dialog box, click OK.
Delete an instance
On the Instances tab, click . In the Delete Instance dialog box that appears, click OK.
After an instance is deleted, the system automatically creates a new instance to replace it. The new instance will have a different IP address.
Scale instances
SAE supports the following two methods for scaling application instances.
Manual scaling: On the Basic Information page of the application, click Manual Scaling. In the scaling panel that appears, adjust the number of instances, and then click OK. For more information, see Manual scaling.
Auto scaling: This method uses an auto scaling policy to adjust the number of instances. For production environments, configure a suitable policy. For more information, see Configure auto scaling policies.
