Simple Log Service defines two Kubernetes CRDs—AliyunPipelineConfig and AliyunLogConfig—that let you manage Logtail configurations as CustomResources (CRs).
Overview
A CRD extends the Kubernetes API to define custom resource types. Each CR is an instance of a CRD. Extend the Kubernetes API with CustomResourceDefinitions.
To manage Logtail configurations with CRs, connect to your Kubernetes cluster, authenticate, and submit a YAML file to the kube-apiserver to create a CR.
If you create a Logtail configuration through a CR, always update it through the CR. Changes made in the SLS console do not sync back to the CR.
CRDs
SLS provides two CRDs for managing Logtail configurations in Kubernetes: AliyunPipelineConfig and AliyunLogConfig. The following table compares their capabilities.
AliyunPipelineConfig requires Logtail 0.5.1 or later.
|
CRD |
AliyunPipelineConfig (recommended) |
AliyunLogConfig |
|
ApiGroup |
telemetry.alibabacloud.com/v1alpha1 |
log.alibabacloud.com/v1alpha1 |
|
CRD resource name |
ClusterAliyunPipelineConfig |
AliyunLogConfig |
|
Scope |
Cluster |
Namespace |
|
Logtail configuration format |
Equivalent to LogtailPipelineConfig |
Equivalent to LogtailConfig |
|
Cross-region capability |
Supported |
Supported |
|
Cross-account capability |
Supported |
Supported |
|
Webhook-related parameter verification |
Supported |
Not supported |
|
Configuration conflict detection |
Supported |
Supported (Logtail 0.5+) |
|
Configuration difficulty |
Relatively low |
Relatively high |
|
Observability configuration |
The Status field includes error details, update time, the previously applied Logtail configuration, and when it was applied. |
The Status field contains the error code and error message. |