This topic describes the parameters that are related to log configuration.

Swarm parameter Description Corresponding Kubernetes parameter Sample Swarm configuration Sample Kubernetes configuration How to migrate
aliyun.log_store_<logstore_name> The Logstore for storing container logs. The aliyun_logs environment variables. For more information, see Use Log Service to collect Kubernetes cluster logs. For more information, see the sample Swarm configuration in aliyun.log_store_. For more information, see the sample Kubernetes configuration in aliyun.log_store_. Automatically converted by Kompose.
aliyun.log_ttl_<logstore_name>

The initial log retention period of the Logstore. Unit: days. Valid value: 1 to 365. Default is 2 days. This is a custom parameter specific to Log Service. For more information, see Enable Log Service.

This parameter specifies the initial value. To change the value, go to the Log Service console.

This parameter does not have a mapping field or configuration in Kubernetes. You can change the log retention period in the Log Service console. aliyun.log_ttl_requestlog: '30' For more information, see the sample Kubernetes configuration in aliyun.log_ttl_.
Migrate manually:
  1. Deploy the Kubernetes resource files. Debug the application and check whether the pod status is Running. If yes, a Logstore is generated in Log Service.
  2. Log on to the Log Service console, find the target Logstore, and change the log retention period based on your needs.
aliyun.log.timestamp Specifies whether to add timestamps when Docker collects logs. For more information, see Enable Log Service. Not supported in Kubernetes. - - No need to migrate.

aliyun.log_store_<logstore_name>

Sample Swarm configuration Sample Kubernetes configuration
aliyun.log_store_<logstore_name> aliyun.log_store_<logstore_name>

For more information, see account-service-deployment.yaml.

aliyun.log_ttl_<logstore_name>

Sample Kubernetes configuration
aliyun.log_ttl_<logstore_name>