You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by ji...@apache.org on 2025/02/28 15:56:25 UTC

(incubator-seata-ctl) branch main updated: feature: enhance K8s cluster operational and observable capabilities. (#8)

This is an automated email from the ASF dual-hosted git repository.

jimin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-seata-ctl.git


The following commit(s) were added to refs/heads/main by this push:
     new 517c2d1  feature: enhance K8s cluster operational and observable capabilities. (#8)
517c2d1 is described below

commit 517c2d18cefc7d84fea8b9dc564693529af43ea8
Author: Bearix <26...@qq.com>
AuthorDate: Fri Feb 28 23:56:21 2025 +0800

    feature: enhance K8s cluster operational and observable capabilities. (#8)
---
 README.md                              | 673 ++++++++++++++++++++++++++++++++-
 action/config/config.go                | 112 ++++++
 action/k8s/common.go                   |  27 ++
 action/k8s/deploy.go                   |  80 ++++
 action/k8s/install.go                  | 120 ++++++
 action/k8s/scale.go                    |  58 +++
 action/k8s/status.go                   |  74 ++++
 action/k8s/undeploy.go                 |  49 +++
 action/k8s/uninstall.go                |  86 +++++
 action/k8s/utils/file.go               |  82 ++++
 action/k8s/utils/http.go               | 178 +++++++++
 action/k8s/utils/request.go            |  30 ++
 action/k8s/utils/yaml.go               |  47 +++
 action/log/common.go                   |  19 +
 action/log/log.go                      | 125 ++++++
 action/log/logadapter/common.go        |   8 +
 action/log/logadapter/elasticsearch.go | 279 ++++++++++++++
 action/log/logadapter/interface.go     |   6 +
 action/log/logadapter/local.go         |  71 ++++
 action/log/logadapter/loki.go          | 111 ++++++
 action/log/logadapter/types.go         |  53 +++
 action/login/login.go                  |  45 +++
 action/prometheus/common.go            |   9 +
 action/prometheus/metrics.go           | 153 ++++++++
 action/root.go                         |  25 +-
 cmd/root.go                            |  31 +-
 config.yml                             |  40 ++
 go.mod                                 |  65 +++-
 go.sum                                 | 160 +++++++-
 model/config.go                        |  49 +++
 seata.yaml                             | 390 +++++++++++++++++++
 tool/log.go                            |  20 +
 32 files changed, 3220 insertions(+), 55 deletions(-)

diff --git a/README.md b/README.md
index 6356e02..d0b5940 100644
--- a/README.md
+++ b/README.md
@@ -15,10 +15,10 @@ Available Commands:
 
 Flags:
   -h, --help              help for seata-ctl
-      --ip string         Seata Server IP (default "127.0.0.1")
-      --password string   Password (default "seata")
-      --port int          Seata Server Admin Port (default 7091)
-      --username string   Username (default "seata")
+      --ip string         Seata Server IP (constants "127.0.0.1")
+      --password string   Password (constants "seata")
+      --port int          Seata Server Admin Port (constants 7091)
+      --username string   Username (constants "seata")
 
 Use "seata-ctl [command] --help" for more information about a command.
 ```
@@ -33,10 +33,16 @@ go build .
 
 # How to use
 
+# Seata
+
+Some Seata commands are used to connect to the Seata server for configuration browsing, transaction simulation, and other functions. To use these features, you must first log in using the `Login` command.
+
 ## Login
 
+Use this command to log in to the seata section. If the login is successful, the login information will be displayed at the beginning of the command line.
+
 ```shell
-$ seata-ctl --ip 127.0.0.1 --port 7091 --username seata --password seata
+$ seata-ctl login --ip=127.0.0.1 --port=7091 --username=seata --password=seata
 127.0.0.1:7091 > # input command here
 ```
 
@@ -161,7 +167,7 @@ Usage:
 
 Flags:
       --config-center   If set configuration center conf
-      --data string     Configuration map (default "{}")
+      --data string     Configuration map (constants "{}")
   -h, --help            help for config
       --registry        If set registry conf
 ```
@@ -299,4 +305,657 @@ Quit the session:
 ```shell
 127.0.0.1:7091 > quit
 Quit the session
-```
\ No newline at end of file
+```
+
+# Config
+
+Seata-ctl uses a YAML configuration file to set up various cluster addresses and connection details. Since manually creating this file can be complex for users, Seata-ctl provides a template for the configuration file.
+
+## Config
+
+### Describe
+
+Used to initialize the configuration file with no parameters required.
+
+After execution, a file named `config.yaml` will be created in the same directory as the terminal. If the file already exists, a message will indicate this. Currently, selecting a different location is not supported.
+
+### Usage
+
+```
+seata-ctl
+config
+```
+
+After use, a file named 'config. yaml' will be created in the same directory as the terminal. If the file already exists, it will prompt that it already exists. We currently do not support selecting other locations.
+
+Each cluster can fill in multiple instances, using a context mechanism similar to kubeconfig to select which cluster and service to use.
+
+The format of the file and the meanings of each field are as follows:(The parameters of the log section will be explained in detail later in the log section)
+
+```
+kubernetes:
+    clusters:
+        - name: ""	//kubernetes cluster name
+          kubeconfigpath: ""	//kubeconfig path
+          ymlpath: ""		//yml config path,not currently supported
+prometheus:
+    servers:
+        - name: ""	//prometheus name
+          address: ""	//prometheus address
+          auth: ""	//prometheus auth info,not currently supported
+log:
+    clusters:
+        - name: ""	//log name
+          types: ""	//log type:ElasticSearch,Loki,Local
+          address: ""	//log server address
+          source: ""	//index name
+          username: ""	//auth username
+          password: ""	//auth password
+          index: ""			//index name
+context:
+    kubernetes: ""  //choose which clusters to use,depend on name
+    prometheus: "" 	//choose which clusters to use,depend on name
+    log: ""					//choose which clusters to use,depend on name
+```
+
+### Example
+
+If everything is normal, it will output:
+
+```
+seata-ctl
+config
+
+Config created successfully!
+```
+
+If the file already exists, it will be output as follows:
+
+```
+seata-ctl
+config
+
+Config file already exists!
+```
+
+The example of writing a configuration file is as follows:
+
+```
+kubernetes:
+  clusters:
+    - name: "cluster1"
+      kubeconfigpath: "/Users/wpy/.kube/config"
+      ymlpath: ""
+    - name: "seata"
+      kubeconfigpath: "/Users/wpy/Documents/Kubernetes/remotekube.txt"
+      ymlpath: ""
+prometheus:
+  servers:
+    - name: "prometheus"
+      address: "http://localhost:9092"
+      auth: ""
+log:
+  clusters:
+    - name: "es"
+      types: "ElasticSearch"
+      address: "https://localhost:9200"
+      source: "logstash-2024.10.24"
+      username: "elastic"
+      password: "bu4AC50REtt_7rUqddMe"
+      index: "log"
+    - name: "loki"
+      types: "Loki"
+      address: "http://localhost:3100"
+      source: ""
+      username: ""
+      password: ""
+      index: ""
+    - name: "local"
+      types: "Local"
+      address: "http://localhost:8080"
+      source: "seata"
+      username: ""
+      password: ""
+      index: ""
+context:
+  kubernetes: "cluster1"
+  prometheus: "prometheus"
+  log: "es"
+```
+
+# Kubernetes
+
+Seata ctl provides various commands to operate Seata servers on Kubernetes clusters.
+
+## Install
+
+### Describe
+
+Use this command to apply CRD (Custom Resource Definition) and deploy controllers on a Kubernetes cluster` Seata tl 'will use these definitions to complete the deployment of Seata.
+
+### Usage
+
+```
+seata-ctl
+install --namespace=default --image=apache/seata-controller:latest --name=seata-k8s-controller-manager
+```
+
+#### Arguments
+
+- `namespace`: Specifies the namespace to use (optional). If not specified, it defaults to `default`.
+- `image`: Specifies the name of the image to use (optional). If not specified, it defaults to `apache/seata-controller:latest`.
+- `name`: Specifies the name of the deployed controller (optional). If not specified, it defaults to `seata-k8s-controller-manager`.
+
+### Example
+
+If the CRD is deployed successfully, a message will display: `create seata crd success`, indicating that a CRD named `seataservers.operator.seata.apache.org` has been deployed in the specified namespace.
+
+If the Deployment is successful, a message will display: `Deployment created successfully`, indicating that a Deployment named `seata-k8s-controller-manager` has been created in the specified namespace, containing a single Pod.
+
+```
+install --namespace=default --image=apache/seata-controller:latest --name=seata-k8s-controller-manager
+
+INFO[0007] Create seata crd success                     
+INFO[0007] Deployment created successfully  
+```
+
+If the CRD already exists, a message will display: `seata crd already exists`.
+
+If the Deployment already exists, a message will display: `Deployment 'seata-k8s-controller-manager' already exists in the 'default' namespace`.
+
+```
+install --namespace=default --image=apache/seata-controller:latest --name=seata-k8s-controller-manager
+
+ERRO[0001] install CRD err: failed to send post request: seata crd already exists 
+ERRO[0001] install Controller err: Deployment 'seata-k8s-controller-manager' already exists in the 'default' namespace 
+```
+
+## Uninstall
+
+### Describe
+
+Use this command to uninstall the CRD and the controller.
+
+### Usage
+
+```
+seata-ctl
+uninstall --namespace=default --name=seata-k8s-controller-manager
+```
+
+#### Arguments
+
+- `namespace`: Specifies the namespace to use (optional). If not specified, it defaults to `default`.
+- `name`: Specifies the name of the deployed controller (optional). If not specified, it defaults to `seata-k8s-controller-manager`.
+
+### Example
+
+If the CRD is deleted successfully, a message will display: `CRD seataservers.operator.seata.apache.org deleted successfully`. If the Deployment is deleted successfully, a message will display: `Deployment 'seata-k8s-controller-manager' deleted successfully from namespace 'default'`.
+
+```
+uninstall --namespace=default --name=seata-k8s-controller-manager
+
+INFO[0017] delete CRD seataservers.operator.seata.apache.org successfully. 
+INFO[0017] deleted Controller seata-k8s-controller-manager successfully  
+```
+
+If the CRD does not exist, a message will display: `CRD seataservers.operator.seata.apache.org does not exist, no action taken`. If the Deployment does not exist, a message will display: `Deployment 'seata-k8s-controller-manager' does not exist in namespace 'default', no action taken`.
+
+```
+uninstall --namespace=default --name=seata-k8s-controller-manager
+
+ERRO[0005] CRD seataservers.operator.seata.apache.org does not exist, no action taken. 
+ERRO[0005] Deployment 'seata-k8s-controller-manager' does not exist in namespace 'default', no action taken. 
+```
+
+## Deploy
+
+### Describe
+
+Use this command to deploy the Seata server on the Kubernetes cluster.
+
+### Usage
+
+```
+seata-ctl
+deploy --name=test --replicas=1 --namespace=default --image=apache/seata-server:latest
+```
+
+After the CR is successfully deployed, the controller will automatically deploy the Seata server instance.
+
+> **Note**: Since the specific namespace where the CRD and controller are installed is uncertain, the Deployment command will not check whether the CRD and controller have been successfully deployed. Before using this command, please ensure that the Seata CRD and controller have been successfully deployed in your cluster.
+
+#### Arguments
+
+- `namespace`: Specifies the namespace. If not specified, it defaults to `default`.
+- `replicas`: Number of deployment replicas. If not specified, it defaults to `1`.
+- `name`: Name of the CR. If not specified, it defaults to `example-seataserver`.
+- `image`: Specifies the name of the image to use (optional). If not specified, it defaults to `apache/seata-server:latest`.
+
+### Example
+
+If the deployment is successful, a message will display: `CR install success, name: example-seataserver`.
+
+```
+deploy --name=test --replicas=1 --namespace=default --image=apache/seata-server:latest
+
+INFO[0013] CR install success,name: test
+```
+
+If the deployment already exists, a message will display: `This seata server already exists!`.
+
+```
+deploy --name=test --replicas=1 --namespace=default --image=apache/seata-server:latest
+
+ERRO[0007] deploy err:seata server already exist! name:test 
+```
+
+If the deployment fails, a message displaying the relevant error information will appear.
+
+```
+deploy --name=test --replicas=1 --namespace=default --image=apache/seata-server:latest
+
+ERRO[0065] deploy err:the server could not find the requested resource 
+```
+
+If this error occurs, it indicates that the CRD and controller were not successfully deployed. Please check your deployment status.
+
+## UnDeploy
+
+### Describe
+
+Use this command to uninstall the deployed Seata server.
+
+### Usage
+
+```
+seata-ctl
+undeploy --name=test --namespace=default
+```
+
+After deletion, the controller will automatically remove the Seata server instance.
+
+#### Arguments
+
+- `namespace`: Specifies the namespace. If not specified, it defaults to `default`.
+- `name`: Name of the CR. If not specified, it defaults to `example-seataserver`.
+
+### Example
+
+If the uninstallation is successful, a message will display: `CR delete success, name: example-seataserver`, indicating that the CR has been successfully uninstalled, and the controller will automatically delete the Seata server from the cluster.
+
+```
+undeploy --name=test --namespace=default
+
+INFO[0308] CR delete success,name: test 
+```
+
+If the CR is not found, a message will display: `seataservers.operator.seata.apache.org "example-seataserver" not found`.
+
+```
+undeploy --name=test --namespace=default
+
+ERRO[0290] undeploy error: seataservers.operator.seata.apache.org "test" not found 
+```
+
+If an exception occurs, the relevant error information will be displayed.
+
+```
+undeploy --name=test --namespace=default
+
+ERRO[0284] undeploy error: the server could not find the requested resource 
+```
+
+If this error occurs, it indicates that the CRD and controller were not successfully deployed. Please check your deployment status.
+
+## Scale
+
+### Describe
+
+Use this command to modify the number of replicas for the deployed Seata server.
+
+### Usage
+
+```
+seata-ctl
+
+scale --name=test --replicas=2 --namespace=default
+```
+
+After the operation, the controller will automatically adjust the replica count, which may take some time.
+
+#### Arguments
+
+- `namespace`: Specifies the namespace. If not specified, it defaults to `default`.
+- `name`: Name of the CR. If not specified, it defaults to `example-seataserver`.
+- `replicas`: Number of deployment replicas. If not specified, it defaults to `1`.
+
+### Example
+
+If the modification is successful, a message will display: `CR scale success, name: example-seataserver`, indicating that the CR has been successfully updated, and the controller will automatically adjust the number of Seata server replicas in the cluster.
+
+```
+scale --name=test --replicas=2 --namespace=default
+
+INFO[0070] CR scale success,name: test  
+```
+
+If the CR is not found, a message will display: `This seata server does not exist!`.
+
+```
+scale --name=test --replicas=2 --namespace=default
+
+ERRO[0058] scale err:This seata server does not exits!test 
+```
+
+## Status
+
+### Describe
+
+Use this command to view the status of the deployed Seata server on the cluster.
+
+### Usage
+
+```
+seata-ctl
+status --name=example-seataserver --namespace=default
+```
+
+> **Note**: This command essentially filters and displays Pods based on their labels. If Seata server Pods were created using other methods (for example, outside of the controller), the relevant Pods may not be found.
+
+#### Arguments
+
+`namespace`: Specifies the namespace. If not specified, it defaults to `default`.
+
+`name`: The name of the CR created when deploying the Seata server. If not specified, it defaults to `example-seataserver`.
+
+### Example
+
+If everything is functioning correctly, a list of `seata-pods` will be displayed.
+
+```
+status --name=example-seataserver --namespace=default
+
+INFO[0319] status: POD NAME                  STATUS     
+INFO[0319] status: ------------------------------------------- 
+INFO[0319] status: example-seataserver-0     Running    
+```
+
+If no pods are found, an error message will be displayed.
+
+```
+status --name=example-seataserver1 --namespace=default
+
+ERRO[0002] get k8s status error: no matching pods found 
+```
+
+# Prometheus
+
+Use this command to display data retrieved from Prometheus.
+
+Before using this command, you need to ensure that Prometheus is properly set up and is correctly collecting metrics from Seata.
+
+## Metrics
+
+### Describe
+
+Use this command to show the data retrieved from Prometheus.
+
+### Usage
+
+```
+seata-ctl
+metrics --target=seata_transaction_summary  
+```
+
+#### Arguments
+
+- `target`: Specify the metric entry to query. This may vary depending on the system and version, so make sure it aligns with the metrics in Prometheus.
+
+### Example
+
+If everything is functioning correctly, the relevant Prometheus metrics will be displayed in the form of a line chart.
+
+```
+metrics --target=seata_transaction_summary
+
+INFO[0095]  10.00 ┼─────────╮
+  9.01 ┤         │
+  8.02 ┤         ╰╮
+  7.03 ┤          │
+  6.04 ┤          ╰╮
+  5.05 ┤           │
+  4.06 ┤           ╰╮
+  3.07 ┤            ╰╮
+  2.08 ┤             ╰─────────╮
+  1.09 ┤                       ╰───────────╮
+  0.10 ┤                                   ╰─────────────
+                    seata_transaction_summary 
+```
+
+If an error occurs, an error message will be displayed.
+
+```
+metrics --target=seata_transaction_summary
+
+ERRO[0093] Failed to show metrics: no data found for metric: seata_transaction_summary 
+```
+
+This error may indicate that the metric was not found. Please check your Prometheus metrics.
+
+# Log
+
+Use this command to view logs on Kubernetes, currently supporting ElasticSearch, Loki, and a custom-developed logging platform. Configuration files and query parameters vary between platforms.
+
+## Log
+
+### Describe
+
+Use this command to retrieve Seata logs from different logging platforms.
+
+Before using this command, please ensure that your logging system is fully deployed and functioning properly.
+
+### Usage
+
+#### ElasticSearch
+
+```
+seata-ctl
+
+log --label={stream=stderr}  --number=3
+```
+
+Before using ES, you need to make the following configurations in the global configuration file. The meanings of the related parameters are as follows,An example of the configuration is as follows:
+
+```
+    - name: "es"  //name
+      types: "ElasticSearch"  //es type
+      address: "https://localhost:9200"   //es address
+      source: "logstash-2024.10.24"    //es index name
+      username: "elastic"   // es auth username
+      password: "bu4AC50REtt_7rUqddMe"  //es auth password
+      index: "log"	//doc type
+```
+
+> Note: Currently, only login with a username and password is supported for ES. If your ES has TLS encryption enabled, it is not supported at this time.
+
+Note: Currently, only login with a username and password is supported for ES. If your ES has TLS encryption enabled, it is not supported at this time.
+
+n the chart, the `index` field represents the output field for the final log display, which may vary across different index structures in ES.The source contains our index structure and the returned document content, but most of the fields are unnecessary for us. We use the index entry to select among these, and only the matching logs will be outputted.
+
+For example, if the returned structure of our query is this:
+
+```
+{
+  "took": 2,
+  "timed_out": false,
+  "_shards": {
+    "total": 1,
+    "successful": 1,
+    "skipped": 0,
+    "failed": 0
+  },
+  "hits": {
+    "total": {
+      "value": 38,
+      "relation": "eq"
+    },
+    "max_score": 1.0,
+    "hits": [
+      {
+        "_index": "logstash-2024.10.24",
+        "_id": "KyvwyJIB5EKHPP6lI9Os",
+        "_score": 1.0,
+        "_ignored": ["log.keyword"],
+        "_source": {
+          "@timestamp": "2024-10-24T17:39:45.771Z",
+          "log": "2024-10-24T17:39:45Z\tINFO\tCreating a new SeataServer Service {default:seata-server-cluster}\t{\"controller\": \"seataserver\", \"controllerGroup\": \"operator.seata.apache.org\", \"controllerKind\": \"SeataServer\", \"SeataServer\": {\"name\":\"example-seataserver\",\"namespace\":\"default\"}, \"namespace\": \"default\", \"name\": \"example-seataserver\", \"reconcileID\": \"5912d1c4-6afd-4d66-8f11-eea6c54a1e4c\"}\n",
+          "stream": "stderr",
+          "time": "2024-10-24T17:39:45.771071Z",
+          "kubernetes": {
+            "pod_name": "seata-k8s-controller-manager-6448b86796-6l46n",
+            "namespace_name": "default",
+            "pod_id": "966edd0e-bc15-4276-9e6a-e255e84859ce",
+            "labels": {
+              "app": "seata-k8s-controller-manager",
+              "pod-template-hash": "6448b86796"
+            },
+            "host": "minikube",
+            "container_name": "seata-k8s-controller-manager",
+            "docker_id": "b87df4627de30b0aab402aef4621fa46f45b3a1976dd6f466ab4a42bb8265455",
+            "container_hash": "bearslyricattack/seata-controller@sha256:84ddedd9fa63c4a3ab8aa3a5017065014826dc3a9cac8c8fff328fbf9c600f11",
+            "container_image": "bearslyricattack/seata-controller:latest"
+          }
+        }
+      }
+    ]
+  }
+}
+
+```
+
+We only need the logs related to the `log` field, so you can set `index` to `log`.
+
+##### Arguments
+
+- `label`: Specify the query entries in the format `{key1=value1, key2=value2, ...}`, where `key` is the name of the index in ES and `value` is the index's value. Neither the key nor the value requires quotation marks in the query.The default value is `{}`.
+- `number`: The number of log entries returned, with a default value of 10.
+
+> Note: To accommodate different ES index structures, a preliminary index structure check will be conducted during log queries. If the index does not contain this structure, the query will not proceed and an error will be returned.
+
+#### Loki
+
+```
+seata-ctl
+
+log --label={job="seata-transaction"} --start=2025-10-18-14:21:21 --end=2025-10-18-22:16:14 --number=3
+```
+
+Before using Loki, you also need to configure it in the configuration file.
+
+```
+    - name: "loki"  //loki name
+      types: "Loki"	//type name
+      address: "http://localhost:3100"  //loki address
+      source: ""
+      username: ""
+      password: ""
+```
+
+##### Arguments
+
+- **query**: The label for the query, following the native format, e.g., `{job="seata-transaction"}`, depending on the overall log format created.
+- **start**: Start time in UTC timezone, formatted as `2024-10-18-12:32:54`.
+- **end**: End time in UTC timezone, formatted as `2024-10-18-12:32:54`.
+- **number**: The number of log entries returned.
+
+#### Local
+
+```
+seata-ctl
+
+log --level=INFO --number=5
+```
+
+Similarly, to meet more diverse needs, we have developed a custom logging system for Seata applications on Kubernetes. This system will continue to evolve along with the Seata-K8s project.
+
+At first,configure it in the configuration file.
+
+```
+    - name: "local" //name
+      types: "Local"  //type
+      address: "http://localhost:8080"  //address
+      source: "seata" //application
+      username: ""
+      password: ""
+      index: ""
+```
+
+### Example
+
+#### ElasticSearch
+
+If everything is functioning correctly, the specified log entries will be returned.
+
+```
+log --label={stream=stderr}  --number=3
+
+INFO[0015] 2024-10-24T17:39:45Z INFO    Creating a new SeataServer Service {default:seata-server-cluster}       {"controller": "seataserver", "controllerGroup": "operator.seata.apache.org", "controllerKind": "SeataServer", "SeataServer": {"name":"example-seataserver","namespace":"default"}, "namespace": "default", "name": "example-seataserver", "reconcileID": "5912d1c4-6afd-4d66-8f11-eea6c54a1e4c"} 
+INFO[0015] 2024-10-24T17:39:45Z INFO    Creating a new SeataServer StatefulSet {default:example-seataserver}    {"controller": "seataserver", "controllerGroup": "operator.seata.apache.org", "controllerKind": "SeataServer", "SeataServer": {"name":"example-seataserver","namespace":"default"}, "namespace": "default", "name": "example-seataserver", "reconcileID": "5912d1c4-6afd-4d66-8f11-eea6c54a1e4c"} 
+INFO[0015] 2024-10-24T17:39:45Z INFO    SeataServer(default/example-seataserver) has not been synchronized yet, requeue in 10 seconds   {"controller": "seataserver", "controllerGroup": "operator.seata.apache.org", "controllerKind": "SeataServer", "SeataServer": {"name":"example-seataserver","namespace":"default"}, "namespace": "default", "name": "example-seataserver", "reconcileID": "5912d1c4-6afd-4d66-8f11-eea6c54a1e4c"} 
+```
+
+If the index does not exist, an error message will be displayed.
+
+```
+log --label={stream1111=stderr}  --number=3
+
+ERRO[0001] get log error: invalid index key: stream1111 
+```
+
+If no documents are found, an error indicating "no results found" will be returned.
+
+```
+log --label={stream=stderr11}  --number=3
+
+ERRO[0060] get log error: no documents found     
+```
+
+If any other errors occur, an error message will be displayed.
+
+#### Loki
+
+If everything is functioning correctly, the specified log entries will be returned.
+
+```
+log --label={job="seata-transaction"} --start=2024-10-18-14:21:21 --end=2024-10-18-22:16:14 --number=2
+
+INFO[0098] 2023-10-17 14:15:23.363 INFO  [TransactionManager] --- Transaction [XID: 172.16.20.1:8091:123456789] ends with SUCCESS. 
+INFO[0098] 2023-10-17 14:15:23.360 INFO  [RMHandler] --- Transaction resource committed successfully: ResourceId: jdbc:mysql://localhost:3306/seata_test, XID: 172.16.20.1:8091:123456789 
+```
+
+If no documents are found, an error indicating "no results found" will be returned.
+
+```
+log --label={job="seata-transaction"} --start=2025-10-18-14:21:21 --end=2025-10-18-22:16:14 --number=3
+
+ERRO[0058] get log error: loki query returned no results 
+```
+
+If any other errors occur, an error message will be displayed.
+
+#### Local
+
+If everything is functioning correctly, the specified log entries will be returned.
+
+```
+log --level=INFO --number=5
+
+Peer example-seataserver-2.seata-server-cluster:9091 is connected
+Peer example-seataserver-1.seata-server-cluster:9091 is connected
+Node <default/example-seataserver-0.seata-server-cluster:9091> term 4 start preVote.
+Peer example-seataserver-2.seata-server-cluster:9091 is connected
+Peer example-seataserver-1.seata-server-cluster:9091 is connected
+```
+
+If any other errors occur, an error message will be displayed.
\ No newline at end of file
diff --git a/action/config/config.go b/action/config/config.go
new file mode 100644
index 0000000..ddfa5e3
--- /dev/null
+++ b/action/config/config.go
@@ -0,0 +1,112 @@
+package config
+
+import (
+	"fmt"
+	"github.com/seata/seata-ctl/model"
+	"github.com/spf13/cobra"
+	"gopkg.in/yaml.v3"
+	"log"
+	"os"
+)
+
+var Path string
+
+var ConfigCmd = &cobra.Command{
+	Use:   "config",
+	Short: "Set config path",
+	Run: func(cmd *cobra.Command, args []string) {
+		err := createYMLFile(Path)
+		if err != nil {
+			println("Error creating config:", err.Error())
+			log.Fatal(err)
+		}
+	},
+}
+
+func init() {
+	ConfigCmd.PersistentFlags().StringVar(&Path, "path", "", "Set config path")
+}
+
+func createSampleConfig() model.Config {
+	return model.Config{
+		Kubernetes: model.Kubernetes{
+			Cluster: []model.KubernetesCluster{
+				{
+					Name:           "",
+					KubeConfigPath: "",
+					YmlPath:        "",
+				},
+			},
+		},
+		Prometheus: model.Prometheus{
+			Servers: []model.Server{
+				{
+					Name:    "",
+					Address: "",
+					Auth:    "",
+				},
+			},
+		},
+		Log: model.Log{
+			Clusters: []model.Cluster{
+				{
+					Name:     "",
+					Types:    "",
+					Address:  "",
+					Source:   "",
+					Username: "",
+					Password: "",
+				},
+			},
+		},
+		Context: model.Context{
+			Kubernetes: "",
+			Prometheus: "",
+			Log:        "",
+		},
+	}
+}
+
+// Create a YAML file
+func createYMLFile(path string) error {
+	// Check if the path exists
+	//if _, err := os.Stat(path); os.IsNotExist(err) {
+	//	return fmt.Errorf("path does not exist: %s", path)
+	//}
+
+	// Check if the file already exists
+	ymlFilePath := "config.yml"
+	if _, err := os.Stat(ymlFilePath); err == nil {
+		fmt.Println("Config file already exists!")
+		return nil
+	}
+
+	// Create a sample config object
+	config := createSampleConfig()
+
+	// Marshal the config object into YAML format
+	data, err := yaml.Marshal(&config)
+	if err != nil {
+		log.Fatalf("Failed to marshal config to YAML: %v", err)
+	}
+
+	// Write the YAML data to a file
+	file, err := os.Create("config.yml")
+	if err != nil {
+		log.Fatalf("Failed to create YAML config: %v", err)
+	}
+	defer func() {
+		if err := file.Close(); err != nil {
+			log.Fatalf("Failed to close config file: %v", err)
+		}
+	}()
+
+	_, err = file.Write(data)
+	if err != nil {
+		log.Fatalf("Failed to write to YAML config: %v", err)
+	}
+	fmt.Println("Config created successfully!")
+	// Update the path variable
+	Path = path
+	return nil
+}
diff --git a/action/k8s/common.go b/action/k8s/common.go
new file mode 100644
index 0000000..f8b52fb
--- /dev/null
+++ b/action/k8s/common.go
@@ -0,0 +1,27 @@
+package k8s
+
+const (
+	DefaultCRName          = "example-seataserver"
+	DefaultServerImage     = "apache/seata-server:latest"
+	DefaultNamespace       = "default"
+	DefaultDeployName      = "seata-k8s-controller-manager"
+	DefaultControllerImage = "apache/seata-controller:latest"
+	DefaultReplicas        = 1
+
+	Label          = "cr_name"
+	CreateCrdPath  = "/apis/apiextensions.k8s.io/v1/customresourcedefinitions"
+	FilePath       = "seata.yaml"
+	CRDname        = "seataservers.operator.seata.apache.org"
+	ServiceName    = "seata-server-cluster"
+	RequestStorage = "1Gi"
+	LimitStorage   = "1Gi"
+)
+
+var (
+	Name            string
+	Replicas        int32
+	Namespace       string
+	Image           string
+	ControllerImage string
+	DeployName      string
+)
diff --git a/action/k8s/deploy.go b/action/k8s/deploy.go
new file mode 100644
index 0000000..3499a32
--- /dev/null
+++ b/action/k8s/deploy.go
@@ -0,0 +1,80 @@
+package k8s
+
+import (
+	"context"
+	"fmt"
+	"github.com/seata/seata-ctl/action/k8s/utils"
+	"github.com/seata/seata-ctl/tool"
+	"github.com/spf13/cobra"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+	"k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+var DeployCmd = &cobra.Command{
+	Use:   "deploy",
+	Short: "deploy seata in k8s",
+	Run: func(cmd *cobra.Command, args []string) {
+		err := deploy()
+		if err != nil {
+			tool.Logger.Errorf("deploy err:%v", err)
+		}
+	},
+}
+
+func init() {
+	DeployCmd.PersistentFlags().StringVar(&Name, "name", DefaultCRName, "Seataserver name")
+	DeployCmd.PersistentFlags().Int32Var(&Replicas, "replicas", 1, "Replicas number")
+	DeployCmd.PersistentFlags().StringVar(&Namespace, "namespace", DefaultNamespace, "Namespace name")
+	DeployCmd.PersistentFlags().StringVar(&Image, "image", DefaultServerImage, "Seata server image")
+}
+
+func deploy() error {
+	client, err := utils.GetDynamicClient()
+	if err != nil {
+		return err
+	}
+	namespace := Namespace
+	gvr := schema.GroupVersionResource{
+		Group:    "operator.seata.apache.org",
+		Version:  "v1alpha1",
+		Resource: "seataservers",
+	}
+
+	var seataServer *unstructured.Unstructured
+	seataServer, err = client.Resource(gvr).Namespace(namespace).Get(context.TODO(), Name, metav1.GetOptions{})
+	if seataServer != nil {
+		return fmt.Errorf("seata server already exist! name:" + Name)
+	}
+	seataServer = &unstructured.Unstructured{
+		Object: map[string]interface{}{
+			"apiVersion": "operator.seata.apache.org/v1alpha1",
+			"kind":       "SeataServer",
+			"metadata": map[string]interface{}{
+				"name":      Name,
+				"namespace": Namespace,
+			},
+			"spec": map[string]interface{}{
+				"serviceName": ServiceName,
+				"replicas":    Replicas,
+				"image":       Image,
+				"store": map[string]interface{}{
+					"resources": map[string]interface{}{
+						"requests": map[string]interface{}{
+							"storage": RequestStorage,
+						},
+						"limits": map[string]interface{}{
+							"storage": LimitStorage,
+						},
+					},
+				},
+			},
+		},
+	}
+	_, err = client.Resource(gvr).Namespace(namespace).Create(context.TODO(), seataServer, metav1.CreateOptions{})
+	if err != nil {
+		return err
+	}
+	tool.Logger.Infof("CR install success,name: %s\n", Name)
+	return nil
+}
diff --git a/action/k8s/install.go b/action/k8s/install.go
new file mode 100644
index 0000000..3434b2c
--- /dev/null
+++ b/action/k8s/install.go
@@ -0,0 +1,120 @@
+package k8s
+
+import (
+	"context"
+	"fmt"
+	"github.com/seata/seata-ctl/action/k8s/utils"
+	"github.com/seata/seata-ctl/tool"
+	"github.com/spf13/cobra"
+	_ "gopkg.in/yaml.v3"
+	_ "io/ioutil"
+	appsv1 "k8s.io/api/apps/v1"
+	corev1 "k8s.io/api/core/v1"
+	_ "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
+	"k8s.io/apimachinery/pkg/api/errors"
+	_ "k8s.io/apimachinery/pkg/api/errors"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+	_ "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+	_ "k8s.io/apimachinery/pkg/runtime/schema"
+	_ "k8s.io/client-go/applyconfigurations/meta/v1"
+)
+
+var InstallCmd = &cobra.Command{
+	Use:   "install",
+	Short: "Install Kubernetes CRD controller",
+	Run: func(cmd *cobra.Command, args []string) {
+		err := DeployCRD()
+		if err != nil {
+			tool.Logger.Errorf("install CRD err: %v", err)
+		}
+		err = DeployController()
+		if err != nil {
+			tool.Logger.Errorf("install Controller err: %v", err)
+		}
+	},
+}
+
+func init() {
+	InstallCmd.PersistentFlags().StringVar(&Namespace, "namespace", DefaultNamespace, "Namespace name")
+	InstallCmd.PersistentFlags().StringVar(&ControllerImage, "image", DefaultControllerImage, "Namespace name")
+	InstallCmd.PersistentFlags().StringVar(&DeployName, "name", DefaultDeployName, "Deployment name")
+}
+
+// DeployCRD deploys the custom resource definition.
+func DeployCRD() error {
+	_, err := utils.CreateRequest(CreateCrdPath, FilePath)
+	if err != nil {
+		return err
+	}
+	return nil
+}
+
+// DeployController deploys the controller for the custom resource.
+func DeployController() error {
+	// Get Kubernetes client
+	client, err := utils.GetClient()
+	if err != nil {
+		return fmt.Errorf("get client err: %v", err)
+	}
+
+	// Define the Deployment name and namespace
+	deploymentName := DeployName
+	namespace := Namespace
+
+	// Check if the Deployment already exists
+	_, err = client.AppsV1().Deployments(namespace).Get(context.TODO(), deploymentName, metav1.GetOptions{})
+	if err == nil {
+		// If the Deployment exists, output a message and return
+		return fmt.Errorf("Deployment '%s' already exists in the '%s' namespace\n", deploymentName, Namespace)
+	} else if !errors.IsNotFound(err) {
+		// If there is an error other than "not found", return it
+		return fmt.Errorf("error checking for existing deployment: %v", err)
+	}
+
+	// Create Deployment object if it does not exist
+	deployment := &appsv1.Deployment{
+		TypeMeta: metav1.TypeMeta{
+			Kind:       "Deployment",
+			APIVersion: "apps/v1",
+		},
+		ObjectMeta: metav1.ObjectMeta{
+			Name: deploymentName,
+		},
+		Spec: appsv1.DeploymentSpec{
+			Replicas: func(i int32) *int32 { return &i }(1),
+			Selector: &metav1.LabelSelector{
+				MatchLabels: map[string]string{
+					"app": deploymentName,
+				},
+			},
+			Template: corev1.PodTemplateSpec{
+				ObjectMeta: metav1.ObjectMeta{
+					Labels: map[string]string{
+						"app": deploymentName,
+					},
+				},
+				Spec: corev1.PodSpec{
+					Containers: []corev1.Container{
+						{
+							Name:  deploymentName,
+							Image: ControllerImage,
+							Ports: []corev1.ContainerPort{
+								{
+									ContainerPort: 80,
+								},
+							},
+						},
+					},
+				},
+			},
+		},
+	}
+
+	// Create the Deployment
+	_, err = client.AppsV1().Deployments(namespace).Create(context.TODO(), deployment, metav1.CreateOptions{})
+	if err != nil {
+		return fmt.Errorf("error creating deployment: %v", err)
+	}
+	tool.Logger.Infof("Deployment created successfully")
+	return nil
+}
diff --git a/action/k8s/scale.go b/action/k8s/scale.go
new file mode 100644
index 0000000..1b091c3
--- /dev/null
+++ b/action/k8s/scale.go
@@ -0,0 +1,58 @@
+package k8s
+
+import (
+	"context"
+	"fmt"
+	"github.com/seata/seata-ctl/action/k8s/utils"
+	"github.com/seata/seata-ctl/tool"
+	"github.com/spf13/cobra"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+	"k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+var ScaleCmd = &cobra.Command{
+	Use:   "scale",
+	Short: "scale seata in k8s",
+	Run: func(cmd *cobra.Command, args []string) {
+		err := scale()
+		if err != nil {
+			tool.Logger.Errorf("scale err:%v", err)
+		}
+	},
+}
+
+func init() {
+	ScaleCmd.PersistentFlags().StringVar(&Name, "name", DefaultCRName, "Seataserver name")
+	ScaleCmd.PersistentFlags().Int32Var(&Replicas, "replicas", DefaultReplicas, "Replicas number")
+	ScaleCmd.PersistentFlags().StringVar(&Namespace, "namespace", DefaultNamespace, "Namespace name")
+}
+
+func scale() error {
+	client, err := utils.GetDynamicClient()
+	if err != nil {
+		return err
+	}
+	namespace := Namespace
+
+	gvr := schema.GroupVersionResource{
+		Group:    "operator.seata.apache.org",
+		Version:  "v1alpha1",
+		Resource: "seataservers",
+	}
+
+	var seataServer *unstructured.Unstructured
+	seataServer, err = client.Resource(gvr).Namespace(namespace).Get(context.TODO(), Name, metav1.GetOptions{})
+	if seataServer == nil {
+		return fmt.Errorf("This seata server does not exits!" + Name)
+	}
+	seataServer.Object["spec"].(map[string]interface{})["replicas"] = Replicas
+
+	_, err = client.Resource(gvr).Namespace(namespace).Update(context.TODO(), seataServer, metav1.UpdateOptions{})
+
+	if err != nil {
+		return err
+	}
+	tool.Logger.Infof("CR scale success,name: %s\n", Name)
+	return nil
+}
diff --git a/action/k8s/status.go b/action/k8s/status.go
new file mode 100644
index 0000000..72bfc49
--- /dev/null
+++ b/action/k8s/status.go
@@ -0,0 +1,74 @@
+package k8s
+
+import (
+	"context"
+	"fmt"
+	"github.com/seata/seata-ctl/action/k8s/utils"
+	"github.com/seata/seata-ctl/tool"
+	"github.com/spf13/cobra"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+var StatusCmd = &cobra.Command{
+	Use:   "status",
+	Short: "show seata status in k8s",
+	Run: func(cmd *cobra.Command, args []string) {
+		err := status()
+		if err != nil {
+			tool.Logger.Errorf("get k8s status error: %v", err)
+		}
+	},
+}
+
+func init() {
+	StatusCmd.PersistentFlags().StringVar(&Name, "name", "list", "Seataserver name")
+	StatusCmd.PersistentFlags().StringVar(&Namespace, "namespace", DefaultNamespace, "Namespace name")
+}
+
+func status() error {
+	statuses, err := getPodsStatusByLabel(Namespace, Name)
+	if err != nil {
+		return err
+	}
+	// Print formatted Pod status information
+	for _, status := range statuses {
+		tool.Logger.Infof("status: %s", status)
+	}
+	return nil
+}
+
+func getPodsStatusByLabel(namespace, labelSelector string) ([]string, error) {
+	client, err := utils.GetClient()
+	if err != nil {
+		return nil, fmt.Errorf("failed to create client: %v", err)
+	}
+
+	// Retrieve all Pods with the specified label
+	// Use LabelSelector to filter Pods with the specified cr_name label
+	labelSelector = Label + "=" + labelSelector
+	pods, err := client.CoreV1().Pods(namespace).List(context.TODO(), metav1.ListOptions{
+		LabelSelector: labelSelector,
+	})
+
+	if err != nil {
+		return nil, fmt.Errorf("failed to list pods: %v", err)
+	}
+
+	// Check if any pods were found
+	if len(pods.Items) == 0 {
+		return nil, fmt.Errorf("no matching pods found") // Alternatively, return a specific error message as needed
+	}
+
+	// Iterate over all Pods and get their status
+	var statuses []string
+
+	// Build formatted status string for output
+	statuses = append(statuses, fmt.Sprintf("%-25s %-10s", "POD NAME", "STATUS")) // Header
+	statuses = append(statuses, fmt.Sprintf("%s", "-------------------------------------------"))
+
+	for _, pod := range pods.Items {
+		statuses = append(statuses, fmt.Sprintf("%-25s %-10s", pod.Name, pod.Status.Phase))
+	}
+
+	return statuses, nil
+}
diff --git a/action/k8s/undeploy.go b/action/k8s/undeploy.go
new file mode 100644
index 0000000..90bb84d
--- /dev/null
+++ b/action/k8s/undeploy.go
@@ -0,0 +1,49 @@
+package k8s
+
+import (
+	"context"
+	"github.com/seata/seata-ctl/action/k8s/utils"
+	"github.com/seata/seata-ctl/tool"
+	"github.com/spf13/cobra"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+	"k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+var UnDeployCmd = &cobra.Command{
+	Use:   "undeploy",
+	Short: "undeploy seata in k8s",
+	Run: func(cmd *cobra.Command, args []string) {
+		err := undeploy()
+		if err != nil {
+			tool.Logger.Errorf("undeploy error: %v", err)
+		}
+	},
+}
+
+func init() {
+	UnDeployCmd.PersistentFlags().StringVar(&Name, "name", DefaultCRName, "Seataserver name")
+	UnDeployCmd.PersistentFlags().StringVar(&Namespace, "namespace", DefaultNamespace, "Namespace name")
+}
+
+func undeploy() error {
+	client, err := utils.GetDynamicClient()
+	if err != nil {
+		return err
+	}
+	namespace := Namespace
+
+	gvr := schema.GroupVersionResource{
+		Group:    "operator.seata.apache.org",
+		Version:  "v1alpha1",
+		Resource: "seataservers",
+	}
+
+	err = client.Resource(gvr).Namespace(namespace).Delete(context.TODO(), Name, metav1.DeleteOptions{})
+	if err != nil {
+		return err
+	}
+
+	tool.Logger.Infof("CR delete success,name: %s\n", Name)
+
+	return nil
+}
diff --git a/action/k8s/uninstall.go b/action/k8s/uninstall.go
new file mode 100644
index 0000000..3a683f0
--- /dev/null
+++ b/action/k8s/uninstall.go
@@ -0,0 +1,86 @@
+package k8s
+
+import (
+	"context"
+	"github.com/seata/seata-ctl/action/k8s/utils"
+	"github.com/seata/seata-ctl/tool"
+	"github.com/spf13/cobra"
+	"k8s.io/apimachinery/pkg/api/errors"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+	"k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+var UnInstallCmd = &cobra.Command{
+	Use:   "uninstall",
+	Short: "uninstall seata in k8s",
+	Run: func(cmd *cobra.Command, args []string) {
+		err := UninstallCRD()
+		if err != nil {
+			tool.Logger.Errorf("uninstall CRD err:%v", err)
+		}
+		err = UnDeploymentController()
+		if err != nil {
+			tool.Logger.Errorf("uninstall Deployment err:%v", err)
+		}
+	},
+}
+
+func init() {
+	UnInstallCmd.PersistentFlags().StringVar(&Namespace, "namespace", DefaultNamespace, "Namespace name")
+	UnInstallCmd.PersistentFlags().StringVar(&DeployName, "name", DefaultDeployName, "Deployment name")
+}
+
+func UninstallCRD() error {
+	client, err := utils.GetDynamicClient()
+	if err != nil {
+		return err
+	}
+
+	gvr := schema.GroupVersionResource{
+		Group:    "apiextensions.k8s.io",
+		Version:  "v1",
+		Resource: "customresourcedefinitions",
+	}
+
+	// Assume client and gvr have already been defined
+	err = client.Resource(gvr).Delete(context.TODO(), CRDname, metav1.DeleteOptions{})
+	if err != nil {
+		// Check if the error is a "not found" error
+		if errors.IsNotFound(err) {
+			// The resource does not exist, output a message instead of returning an error
+			tool.Logger.Errorf("CRD %s does not exist, no action taken.\n", CRDname)
+		} else {
+			// For other errors, log the error and exit the program
+			tool.Logger.Errorf("delete CRD failed: %v", err)
+		}
+	} else {
+		// Successfully deleted the resource
+		tool.Logger.Infof("delete CRD %s successfully.\n", CRDname)
+	}
+
+	return nil
+}
+
+func UnDeploymentController() error {
+	client, err := utils.GetClient()
+	if err != nil {
+		return err
+	}
+
+	// Assume client has already been defined
+	err = client.AppsV1().Deployments(Namespace).Delete(context.TODO(), DeployName, metav1.DeleteOptions{})
+	if err != nil {
+		// Check if the error is a "not found" error
+		if errors.IsNotFound(err) {
+			// The deployment does not exist, output a message instead of returning an error
+			tool.Logger.Errorf("Deployment '%s' does not exist in namespace '%s', no action taken.\n", DeployName, Namespace)
+		} else {
+			// For other errors, log the error and exit the program
+			tool.Logger.Errorf("Error deleting deployment: %s", err.Error())
+		}
+	} else {
+		// Successfully deleted the deployment
+		tool.Logger.Infof("deleted Controller %s successfully ", DeployName)
+	}
+	return nil
+}
diff --git a/action/k8s/utils/file.go b/action/k8s/utils/file.go
new file mode 100644
index 0000000..e4968b1
--- /dev/null
+++ b/action/k8s/utils/file.go
@@ -0,0 +1,82 @@
+package utils
+
+import (
+	"fmt"
+	"github.com/seata/seata-ctl/model"
+	"gopkg.in/yaml.v3"
+	"k8s.io/client-go/dynamic"
+	"k8s.io/client-go/kubernetes"
+	"k8s.io/client-go/tools/clientcmd"
+	"os"
+)
+
+const ConfigFileName = "config.yml"
+
+// GetKubeConfigPath retrieves the kubeConfigPath based on the contents of the config file.
+func GetKubeConfigPath() (string, error) {
+	// Read the configuration file
+	file, err := os.ReadFile(ConfigFileName)
+	if err != nil {
+		return "", fmt.Errorf("failed to read config.yml:" + err.Error())
+	}
+	var config model.Config
+	err = yaml.Unmarshal(file, &config)
+	if err != nil {
+		return "", fmt.Errorf("unmarshal failed" + err.Error())
+	}
+	// Retrieve the context name
+	contextName := config.Context.Kubernetes
+	var contextPath string
+	// Find the matching KubeConfig path based on the context
+	for _, cluster := range config.Kubernetes.Cluster {
+		if cluster.Name == contextName {
+			contextPath = cluster.KubeConfigPath
+		}
+	}
+	// If no matching context is found, return an error
+	if contextPath == "" {
+		return "", fmt.Errorf("failed to find context in config.yml")
+	}
+	return contextPath, err
+}
+
+// GetClient creates and returns a Kubernetes client based on the specified KubeConfigPath file path.
+func GetClient() (*kubernetes.Clientset, error) {
+	// Load the KubeConfig file using the client
+	KubeConfigPath, err := GetKubeConfigPath()
+	if err != nil {
+		return nil, err
+	}
+	config, err := clientcmd.BuildConfigFromFlags("", KubeConfigPath)
+	if err != nil {
+		return nil, err
+	}
+
+	// Create a Kubernetes client
+	client, err := kubernetes.NewForConfig(config)
+	if err != nil {
+		return nil, err
+	}
+
+	return client, nil
+}
+
+// GetDynamicClient creates and returns a Kubernetes dynamic client based on the specified KubeConfigPath file path.
+func GetDynamicClient() (*dynamic.DynamicClient, error) {
+	// Load the KubeConfigPath file using the client
+	KubeConfigPath, err := GetKubeConfigPath()
+	if err != nil {
+		return nil, err
+	}
+	config, err := clientcmd.BuildConfigFromFlags("", KubeConfigPath)
+	if err != nil {
+		return nil, err
+	}
+
+	// Create a dynamic client
+	dynamicClient, err := dynamic.NewForConfig(config)
+	if err != nil {
+		return nil, fmt.Errorf("failed to create dynamic client" + err.Error())
+	}
+	return dynamicClient, nil
+}
diff --git a/action/k8s/utils/http.go b/action/k8s/utils/http.go
new file mode 100644
index 0000000..e06ade3
--- /dev/null
+++ b/action/k8s/utils/http.go
@@ -0,0 +1,178 @@
+package utils
+
+import (
+	"bytes"
+	"crypto/tls"
+	"crypto/x509"
+	"fmt"
+	"github.com/seata/seata-ctl/tool"
+	"io"
+	"io/ioutil"
+	"k8s.io/client-go/tools/clientcmd"
+	"k8s.io/client-go/tools/clientcmd/api"
+	"net/http"
+	"strings"
+)
+
+type ContextType string
+
+const (
+	Json ContextType = "application/json"
+)
+
+// ContextInfo is a structure to hold client certificate, key, CA certificate, API server URL, and content type.
+type ContextInfo struct {
+	ClientCert  string
+	ClientKey   string
+	CACert      string
+	APIServer   string
+	ContentType ContextType
+}
+
+// LoadKubeConfig loads the kubeconfig from the provided path and filename
+func LoadKubeConfig(kubeconfigFullPath string) (*api.Config, error) {
+	// Read the kubeconfig file
+	kubeconfigBytes, err := ioutil.ReadFile(kubeconfigFullPath)
+	if err != nil {
+		return nil, fmt.Errorf("failed to read kubeconfig file: %v", err)
+	}
+	// Convert the kubeconfig file content into the Config struct
+	config, err := clientcmd.Load(kubeconfigBytes)
+	if err != nil {
+		return nil, fmt.Errorf("failed to load kubeconfig: %v", err)
+	}
+	return config, nil
+}
+
+// GetContextInfo extracts the client certificate, key, CA certificate, API server URL, and content type
+// from the provided *api.Config for the current context.
+func GetContextInfo(config *api.Config) (*ContextInfo, error) {
+	// Get the current context name
+	currentContext := config.CurrentContext
+	if currentContext == "" {
+		return nil, fmt.Errorf("no current context is set")
+	}
+	// Get the current context object
+	context, ok := config.Contexts[currentContext]
+	if !ok {
+		return nil, fmt.Errorf("context %s not found", currentContext)
+	}
+	// Get the cluster object
+	cluster, ok := config.Clusters[context.Cluster]
+	if !ok {
+		return nil, fmt.Errorf("cluster %s not found", context.Cluster)
+	}
+	// Get the user object
+	authInfo, ok := config.AuthInfos[context.AuthInfo]
+	if !ok {
+		return nil, fmt.Errorf("auth info %s not found", context.AuthInfo)
+	}
+	// Extract the certificate and API server information
+	clientCert := authInfo.ClientCertificate
+	clientKey := authInfo.ClientKey
+	caCert := cluster.CertificateAuthority
+	apiServer := cluster.Server
+	// Content type for API request
+	contentType := Json
+	// Check if all required fields are present
+	if clientCert == "" || clientKey == "" || caCert == "" || apiServer == "" {
+		missingFields := []string{}
+		if clientCert == "" {
+			missingFields = append(missingFields, "client certificate")
+		}
+		if clientKey == "" {
+			missingFields = append(missingFields, "client key")
+		}
+		if caCert == "" {
+			missingFields = append(missingFields, "CA certificate")
+		}
+		if apiServer == "" {
+			missingFields = append(missingFields, "API server")
+		}
+		return nil, fmt.Errorf("missing required fields: %s", strings.Join(missingFields, ", "))
+	}
+	// Return the ContextInfo struct
+	return &ContextInfo{
+		ClientCert:  clientCert,
+		ClientKey:   clientKey,
+		CACert:      caCert,
+		APIServer:   apiServer,
+		ContentType: contentType,
+	}, nil
+}
+
+// sendPostRequest sends a POST request to the Kubernetes API server to create a custom resource definition (CRD)
+func sendPostRequest(context *ContextInfo, createCrdPath string, filePath string) (string, error) {
+	certFile := context.ClientCert
+	keyFile := context.ClientKey
+	caCertFile := context.CACert
+	url := context.APIServer + createCrdPath
+	contentType := context.ContentType
+
+	// Load client certificate and key
+	cert, err := tls.LoadX509KeyPair(certFile, keyFile)
+	if err != nil {
+		return "", fmt.Errorf("failed to load certificate and key: %v", err)
+	}
+
+	// Read CA certificate
+	caCert, err := ioutil.ReadFile(caCertFile)
+	if err != nil {
+		return "", fmt.Errorf("failed to read CA certificate: %v", err)
+	}
+	caCertPool := x509.NewCertPool()
+	if ok := caCertPool.AppendCertsFromPEM(caCert); !ok {
+		return "", fmt.Errorf("failed to append CA certificate")
+	}
+
+	tlsConfig := &tls.Config{
+		Certificates: []tls.Certificate{cert},
+		RootCAs:      caCertPool,
+	}
+	transport := &http.Transport{TLSClientConfig: tlsConfig}
+	client := &http.Client{Transport: transport}
+
+	// Read data from file
+	data, err := ioutil.ReadFile(filePath)
+	if err != nil {
+		return "", fmt.Errorf("failed to read data file: %v", err)
+	}
+
+	// Create a POST request
+	req, err := http.NewRequest("POST", url, bytes.NewBuffer(data))
+	if err != nil {
+		return "", fmt.Errorf("failed to create request: %v", err)
+	}
+
+	// Set content type
+	req.Header.Set("Content-Type", string(contentType))
+
+	// Send the request
+	resp, err := client.Do(req)
+	if err != nil {
+		return "", fmt.Errorf("failed to send request: %v", err)
+	}
+	defer func(Body io.ReadCloser) {
+		err := Body.Close()
+		if err != nil {
+			tool.Logger.Error("failed to close response body: %v", err)
+		}
+	}(resp.Body)
+
+	// Read response body
+	body, err := ioutil.ReadAll(resp.Body)
+	if err != nil {
+		return "", fmt.Errorf("failed to read response: %v", err)
+	}
+
+	// Return appropriate response based on status code
+	if resp.StatusCode == http.StatusCreated {
+		tool.Logger.Infof("Create seata crd success")
+		return "", nil
+	}
+	if resp.StatusCode == http.StatusConflict {
+		return "", fmt.Errorf("seata crd already exists")
+	} else {
+		return "error: " + string(body), err
+	}
+}
diff --git a/action/k8s/utils/request.go b/action/k8s/utils/request.go
new file mode 100644
index 0000000..797c35f
--- /dev/null
+++ b/action/k8s/utils/request.go
@@ -0,0 +1,30 @@
+package utils
+
+import "fmt"
+
+func CreateRequest(createCrdPath string, filePath string) (string, error) {
+	kubeConfigPath, err := GetKubeConfigPath()
+	if err != nil {
+		return "", fmt.Errorf("failed to get kubeconfig path: %v", err)
+	}
+	kubeConfig, err := LoadKubeConfig(kubeConfigPath)
+	if err != nil {
+		return "", fmt.Errorf("failed to load kubeconfig file: %v", err)
+	}
+	contextInfo, err := GetContextInfo(kubeConfig)
+	if err != nil {
+		return "", fmt.Errorf("failed to get context info: %v", err)
+	}
+
+	filePath, err = ConvertAndSaveYamlToJSON(filePath)
+
+	if err != nil {
+		return "", fmt.Errorf("failed to save yaml: %v", err)
+	}
+
+	res, err := sendPostRequest(contextInfo, createCrdPath, filePath)
+	if err != nil {
+		return res, fmt.Errorf("failed to send post request: %v", err)
+	}
+	return res, nil
+}
diff --git a/action/k8s/utils/yaml.go b/action/k8s/utils/yaml.go
new file mode 100644
index 0000000..ace8721
--- /dev/null
+++ b/action/k8s/utils/yaml.go
@@ -0,0 +1,47 @@
+package utils
+
+import (
+	"fmt"
+	"io/ioutil"
+	"os"
+	"path/filepath"
+	"sigs.k8s.io/yaml"
+)
+
+// ConvertAndSaveYamlToJSON takes a YAML file path and a target file name, converts it to JSON,
+// and does not convert if the JSON file already exists.
+func ConvertAndSaveYamlToJSON(targetName string) (string, error) {
+	// Get the original file directory, filename, and extension
+	dir, file := filepath.Split(targetName)
+	fileName := file[:len(file)-len(filepath.Ext(file))] // Remove the original file extension
+	if targetName == "" {
+		targetName = fileName // If no target name is provided, use the original YAML file name
+	}
+	newFilePath := filepath.Join(dir, fileName+".json") // Generate the new JSON file path
+
+	// Check if the JSON file already exists
+	if _, err := os.Stat(newFilePath); err == nil {
+		return newFilePath, nil
+	} else if !os.IsNotExist(err) {
+		return "", fmt.Errorf("failed to check JSON file existence: %v", err)
+	}
+
+	// Read the YAML file
+	yamlData, err := ioutil.ReadFile(targetName)
+	if err != nil {
+		return "", fmt.Errorf("failed to read YAML file: %v", err)
+	}
+
+	// Convert the YAML to JSON
+	jsonData, err := yaml.YAMLToJSON(yamlData)
+	if err != nil {
+		return "", fmt.Errorf("failed to convert YAML to JSON: %v", err)
+	}
+
+	// Write the converted JSON data to the new file
+	err = ioutil.WriteFile(newFilePath, jsonData, 0644)
+	if err != nil {
+		return "", fmt.Errorf("failed to write JSON file: %v", err)
+	}
+	return newFilePath, nil
+}
diff --git a/action/log/common.go b/action/log/common.go
new file mode 100644
index 0000000..7e480df
--- /dev/null
+++ b/action/log/common.go
@@ -0,0 +1,19 @@
+package log
+
+const (
+	ElasticSearchType = "ElasticSearch"
+	LokiType          = "Loki"
+	LocalType         = "Local"
+
+	DefaultNumber        = 10
+	DefaultLogLevel      = ""
+	DefaultLocalLogLevel = "-"
+)
+
+var (
+	Label  string
+	Number int
+	Start  string
+	End    string
+	Level  string
+)
diff --git a/action/log/log.go b/action/log/log.go
new file mode 100644
index 0000000..dcb958c
--- /dev/null
+++ b/action/log/log.go
@@ -0,0 +1,125 @@
+package log
+
+import (
+	"fmt"
+	"github.com/seata/seata-ctl/action/log/logadapter"
+	"github.com/seata/seata-ctl/model"
+	"github.com/seata/seata-ctl/tool"
+	"github.com/spf13/cobra"
+	"gopkg.in/yaml.v3"
+	"os"
+)
+
+var LogCmd = &cobra.Command{
+	Use:   "log",
+	Short: "get seata log",
+	Run: func(cmd *cobra.Command, args []string) {
+		err := getLog()
+		if err != nil {
+			tool.Logger.Errorf("get log error: %s", err)
+		}
+	},
+}
+
+func init() {
+	LogCmd.PersistentFlags().StringVar(&Level, "level", DefaultLogLevel, "seata log level")
+	LogCmd.PersistentFlags().IntVar(&Number, "number", DefaultNumber, "seata number")
+	LogCmd.PersistentFlags().StringVar(&Label, "label", "{}", "seata label")
+	LogCmd.PersistentFlags().StringVar(&Start, "start", "", "seata start")
+	LogCmd.PersistentFlags().StringVar(&End, "end", "", "seata end")
+}
+
+func getLog() error {
+	context, currency, err := getContext()
+	if err != nil {
+		return err
+	}
+	logType := context.Types
+
+	var client logadapter.LogQuery
+	var filter = make(map[string]interface{})
+
+	switch logType {
+	case ElasticSearchType:
+		{
+			client = &logadapter.Elasticsearch{}
+			filter = buildElasticSearchFilter()
+		}
+	case LokiType:
+		{
+			client = &logadapter.Loki{}
+			filter = buildLokiFilter()
+		}
+	case LocalType:
+		{
+			client = &logadapter.Local{}
+			filter = buildLocalFilter()
+		}
+	}
+
+	if client == nil {
+		return fmt.Errorf("can not get client")
+	}
+
+	err = client.QueryLogs(filter, currency, Number)
+	if err != nil {
+		return err
+	}
+
+	return nil
+}
+
+func getContext() (*model.Cluster, *logadapter.Currency, error) {
+	file, err := os.ReadFile("config.yml")
+	if err != nil {
+		return nil, nil, fmt.Errorf("read config.yml error: %s", err)
+	}
+	var config model.Config
+	err = yaml.Unmarshal(file, &config)
+	if err != nil {
+		return nil, nil, fmt.Errorf("unmarshal config.yml error: %s", err)
+	}
+	contextName := config.Context.Log
+	for _, cluster := range config.Log.Clusters {
+		if cluster.Name == contextName {
+			currency := logadapter.Currency{
+				Address:  cluster.Address,
+				Source:   cluster.Source,
+				Username: cluster.Username,
+				Password: cluster.Password,
+				Index:    cluster.Index,
+			}
+			return &cluster, &currency, nil
+		}
+	}
+	return nil, nil, fmt.Errorf("failed to find context in config.yml")
+}
+
+func buildElasticSearchFilter() map[string]interface{} {
+	filter := make(map[string]interface{})
+	filter["query"] = Label
+	return filter
+}
+
+func buildLokiFilter() map[string]interface{} {
+	filter := make(map[string]interface{})
+	filter["query"] = Label
+	if Start != "" {
+		filter["start"] = Start
+	}
+	if End != "" {
+		filter["end"] = End
+	}
+	return filter
+}
+
+func buildLocalFilter() map[string]interface{} {
+	filter := make(map[string]interface{})
+	if Level != "" {
+		filter["logLevel"] = Level
+	} else {
+		//reset the constants value
+		filter["logLevel"] = DefaultLocalLogLevel
+	}
+	return filter
+}
diff --git a/action/log/logadapter/common.go b/action/log/logadapter/common.go
new file mode 100644
index 0000000..d325c75
--- /dev/null
+++ b/action/log/logadapter/common.go
@@ -0,0 +1,8 @@
+package logadapter
+
+const (
+	LokiAddressPath = "/loki/api/v1/query_range?"
+	TimeLayout      = "2006-01-02-15:04:05"
+
+	LocalQueryPath = "/query"
+)
diff --git a/action/log/logadapter/elasticsearch.go b/action/log/logadapter/elasticsearch.go
new file mode 100644
index 0000000..29b1842
--- /dev/null
+++ b/action/log/logadapter/elasticsearch.go
@@ -0,0 +1,279 @@
+package logadapter
+
+import (
+	"context"
+	"crypto/tls"
+	"encoding/json"
+	"fmt"
+	"github.com/elastic/go-elasticsearch/v8"
+	"github.com/elastic/go-elasticsearch/v8/esapi"
+	"github.com/olivere/elastic/v7"
+	"github.com/seata/seata-ctl/tool"
+	"io"
+	"net/http"
+	"strings"
+)
+
+// QueryLogs is a function that queries specific documents
+func (e *Elasticsearch) QueryLogs(filter map[string]interface{}, currency *Currency, number int) error {
+	client, err := createElasticClient(currency)
+	if err != nil {
+		return fmt.Errorf("failed to create elasticsearch client: %w", err)
+	}
+
+	indexName := currency.Source
+
+	indexFields, err := getEsIndexList(currency)
+	if err != nil {
+		return err
+	}
+	query, err := buildQuery(filter, indexFields)
+	if err != nil {
+		return err
+	}
+
+	// Execute the search query
+	searchResult, err := client.Search().
+		Index(indexName).
+		Size(number).
+		Query(query).
+		Do(context.Background())
+	if err != nil {
+		return fmt.Errorf("error fetching documents: %w", err)
+	}
+
+	err = processSearchHits(searchResult, currency)
+	if err != nil {
+		return err
+	}
+	return nil
+}
+
+// createElasticClient configures and creates a new Elasticsearch client
+func createElasticClient(currency *Currency) (*elastic.Client, error) {
+	httpClient := &http.Client{
+		Transport: &http.Transport{
+			TLSClientConfig: &tls.Config{
+				InsecureSkipVerify: true,
+			},
+		},
+	}
+
+	client, err := elastic.NewClient(
+		elastic.SetURL(currency.Address),
+		elastic.SetHttpClient(httpClient),
+		elastic.SetSniff(false),
+		elastic.SetBasicAuth(currency.Username, currency.Password),
+	)
+	if err != nil {
+		return nil, err
+	}
+	return client, nil
+}
+
+// createEsDefaultClient configures and creates a new Elasticsearch client
+func createEsDefaultClient(currency *Currency) (*elasticsearch.Client, error) {
+	// Configure the Elasticsearch client
+	cfg := elasticsearch.Config{
+		Addresses: []string{
+			currency.Address,
+		},
+		Username: currency.Username,
+		Password: currency.Password,
+		// Skip certificate verification if using a self-signed certificate
+		Transport: &http.Transport{
+			TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
+		},
+	}
+
+	// Create the client instance
+	es, err := elasticsearch.NewClient(cfg)
+	if err != nil {
+		return nil, fmt.Errorf("error creating the client: %s", err)
+	}
+	return es, nil
+}
+
+// processSearchHits handles and formats the search results
+func processSearchHits(searchResult *elastic.SearchResult, currency *Currency) error {
+	if len(searchResult.Hits.Hits) == 0 {
+		return fmt.Errorf("no documents found")
+	}
+
+	for _, hit := range searchResult.Hits.Hits {
+		var doc map[string]interface{}
+		if err := json.Unmarshal(hit.Source, &doc); err != nil {
+			return fmt.Errorf("failed to unmarshal document: %w", err)
+		}
+
+		// Pretty print the document content
+		for key, value := range doc {
+			if key == currency.Index {
+				if strings.Contains(value.(string), "INFO") {
+					tool.Logger.Info(fmt.Sprintf("%v", value))
+				}
+				if strings.Contains(value.(string), "ERROR") {
+					tool.Logger.Error(fmt.Sprintf("%v", value))
+				}
+				if strings.Contains(value.(string), "WARN") {
+					tool.Logger.Warn(fmt.Sprintf("%v", value))
+				}
+			}
+		}
+	}
+	return nil
+}
+
+// getFieldNames recursively extracts field names under the "fields" key
+func getFieldNames(properties map[string]interface{}, prefix string) []string {
+	fieldNames := []string{}
+
+	for fieldName, fieldValue := range properties {
+		// Generate the full path for the current field
+		fullName := fieldName
+		if prefix != "" {
+			fullName = prefix + "." + fieldName
+		}
+
+		// Check if the field contains a "fields" node
+		if fieldMap, ok := fieldValue.(map[string]interface{}); ok {
+			if fields, ok := fieldMap["fields"].(map[string]interface{}); ok {
+				// If there is a "fields" node, iterate through its fields and add to the result
+				for subField := range fields {
+					fieldNames = append(fieldNames, fullName+"."+subField)
+				}
+			}
+
+			// If the field contains nested "properties", recursively parse subfields
+			if nestedProperties, ok := fieldMap["properties"].(map[string]interface{}); ok {
+				fieldNames = append(fieldNames, getFieldNames(nestedProperties, fullName)...)
+			}
+		}
+	}
+
+	return fieldNames
+}
+
+// extractFields extracts all field names from a nested map structure
+func extractFields(data map[string]interface{}) []string {
+	var allFields []string
+
+	// Iterate through each index to get its field names
+	for _, indexData := range data {
+		if indexMap, ok := indexData.(map[string]interface{}); ok {
+			if mappings, ok := indexMap["mappings"].(map[string]interface{}); ok {
+				if properties, ok := mappings["properties"].(map[string]interface{}); ok {
+					// Get all field names under "fields" and merge into the result
+					allFields = append(allFields, getFieldNames(properties, "")...)
+				}
+			}
+		}
+	}
+
+	return allFields
+}
+
+// ParseJobString parses the input string and returns a map
+func ParseJobString(input string) (map[string]string, error) {
+	// Remove curly braces
+	input = strings.Trim(input, "{}")
+
+	// Split by ','
+	parts := strings.Split(input, ",")
+	kvMap := make(map[string]string)
+
+	for _, part := range parts {
+		// Split by '=' to get key-value pairs
+		kv := strings.Split(part, "=")
+		if len(kv) != 2 {
+			return nil, fmt.Errorf("invalid key=value pair: %s", part)
+		}
+		kvMap[strings.TrimSpace(kv[0])] = strings.TrimSpace(kv[1])
+	}
+
+	return kvMap, nil
+}
+
+// Contains checks if a string exists in a slice of strings
+func Contains(slice []string, str string) bool {
+	for _, item := range slice {
+		if item == str {
+			return true
+		}
+	}
+	return false
+}
+
+// getEsIndexList retrieves field names from the specified Elasticsearch index
+func getEsIndexList(currency *Currency) ([]string, error) {
+	es, err := createEsDefaultClient(currency)
+	if err != nil {
+		return nil, fmt.Errorf("failed to create Elasticsearch client: %w", err)
+	}
+
+	// Build the request to get the mappings
+	req := esapi.IndicesGetMappingRequest{
+		Index: []string{currency.Source}, // Specify the index name
+	}
+
+	// Execute the request
+	res, err := req.Do(context.Background(), es)
+	if err != nil {
+		return nil, fmt.Errorf("error getting mapping: %s", err)
+	}
+	defer func(Body io.ReadCloser) {
+		err := Body.Close()
+		if err != nil {
+			tool.Logger.Error("error closing body")
+		}
+	}(res.Body)
+
+	// Check if the response is successful
+	if res.IsError() {
+		return nil, fmt.Errorf("error response: %s", res.String())
+	}
+
+	// Read and parse the response
+	var result map[string]interface{}
+	if err := json.NewDecoder(res.Body).Decode(&result); err != nil {
+		return nil, fmt.Errorf("failed to make request to %s", err)
+	}
+
+	// Call method to extract field names
+	indexFields := extractFields(result)
+	indexFields = removeKeywordSuffix(indexFields)
+	return indexFields, nil
+}
+
+// removeKeywordSuffix removes ".keyword" suffix from each string in the slice
+func removeKeywordSuffix(input []string) []string {
+	var result []string
+	for _, str := range input {
+		// Check if the string ends with ".keyword"
+		if strings.HasSuffix(str, ".keyword") {
+			// Remove the ".keyword" suffix
+			str = strings.TrimSuffix(str, ".keyword")
+		}
+		result = append(result, str) // Add the processed string to the result slice
+	}
+	return result
+}
+
+// buildQuery constructs a BoolQuery based on the provided filter and index fields
+func buildQuery(filter map[string]interface{}, indexFields []string) (*elastic.BoolQuery, error) {
+	query := elastic.NewBoolQuery()
+	if filter["query"].(string) != "{}" {
+		indexMap, err := ParseJobString(filter["query"].(string))
+		if err != nil {
+			return query, err
+		}
+		for k, v := range indexMap {
+			if Contains(indexFields, k) {
+				query.Should(elastic.NewTermQuery(k, v))
+			} else {
+				return query, fmt.Errorf("invalid index key: %s", k)
+			}
+		}
+	}
+	return query, nil
+}
diff --git a/action/log/logadapter/interface.go b/action/log/logadapter/interface.go
new file mode 100644
index 0000000..a626b99
--- /dev/null
+++ b/action/log/logadapter/interface.go
@@ -0,0 +1,6 @@
+package logadapter
+
+type LogQuery interface {
+	// QueryLogs retrieves logs based on the filter criteria
+	QueryLogs(filter map[string]interface{}, currency *Currency, number int) error
+}
diff --git a/action/log/logadapter/local.go b/action/log/logadapter/local.go
new file mode 100644
index 0000000..5a39f56
--- /dev/null
+++ b/action/log/logadapter/local.go
@@ -0,0 +1,71 @@
+package logadapter
+
+import (
+	"encoding/json"
+	"fmt"
+	"github.com/seata/seata-ctl/tool"
+	"io"
+	"io/ioutil"
+	"net/http"
+	"strings"
+)
+
+// QueryLogs sends a request to the /query endpoint and retrieves logs based on the provided filter.
+// - filter: A map that holds log filtering parameters such as log level.
+// - currency: A struct containing information like the source application and API address.
+// - number: The number of logs to fetch (limit).
+func (l *Local) QueryLogs(filter map[string]interface{}, currency *Currency, number int) error {
+	logLevel, ok := filter["logLevel"].(string)
+	if !ok {
+		return fmt.Errorf("logLevel is missing or invalid in the filter")
+	}
+
+	// Build the query URL using the filter and currency information
+	url := fmt.Sprintf("%s%s?application_id=%s&log_level=%s&limit=%d", currency.Address, LocalQueryPath, currency.Source, logLevel, number)
+
+	// Send a GET request to the /query endpoint
+	resp, err := http.Get(url)
+	if err != nil {
+		return fmt.Errorf("failed to make request to %s: %v", url, err)
+	}
+	defer func(Body io.ReadCloser) {
+		err := Body.Close()
+		if err != nil {
+			tool.Logger.Error("failed to close response body: %v", err)
+		}
+	}(resp.Body)
+
+	// Read the response body
+	body, err := ioutil.ReadAll(resp.Body)
+	if err != nil {
+		return fmt.Errorf("failed to read response body: %v", err)
+	}
+
+	// Check if the response status is OK (200)
+	if resp.StatusCode != http.StatusOK {
+		return fmt.Errorf("received non-200 response status: %d", resp.StatusCode)
+	}
+
+	// Parse the JSON response body into QueryResponse struct
+	var queryResponse QueryResponse
+	err = json.Unmarshal(body, &queryResponse)
+	if err != nil {
+		return fmt.Errorf("failed to parse JSON response: %v", err)
+	}
+
+	// Print the logs in a structured format
+	for _, value := range queryResponse.Logs {
+		res := fmt.Sprintf("[%s]: %s\n", value.Timestamp, value.LogMessage)
+		fmt.Println(value.LogMessage)
+		if strings.Contains(value.LogMessage, "INFO") {
+			tool.Logger.Info(fmt.Sprintf("%v", res))
+		}
+		if strings.Contains(value.LogMessage, "ERROR") {
+			tool.Logger.Error(fmt.Sprintf("%v", res))
+		}
+		if strings.Contains(value.LogMessage, "WARN") {
+			tool.Logger.Warn(fmt.Sprintf("%v", res))
+		}
+	}
+	return nil
+}
diff --git a/action/log/logadapter/loki.go b/action/log/logadapter/loki.go
new file mode 100644
index 0000000..99b9385
--- /dev/null
+++ b/action/log/logadapter/loki.go
@@ -0,0 +1,111 @@
+package logadapter
+
+import (
+	"encoding/json"
+	"fmt"
+	"github.com/seata/seata-ctl/tool"
+	"io"
+	"io/ioutil"
+	"net/http"
+	"net/url"
+	"strconv"
+	"strings"
+	"time"
+)
+
+// QueryLogs queries logs from Loki based on the filter and settings provided
+func (l *Loki) QueryLogs(filter map[string]interface{}, currency *Currency, number int) error {
+
+	// Prepare the query URL with time range
+	params := url.Values{}
+	params.Set("query", filter["query"].(string))
+	params.Set("limit", strconv.Itoa(number))
+
+	// Set start time if provided
+	if value, ok := filter["start"]; ok {
+		res, err := parseToTimestamp(value.(string))
+		if err != nil {
+			return err
+		}
+		params.Set("start", fmt.Sprintf("%d", res))
+	}
+	// Set end time if provided
+	if value, ok := filter["end"]; ok {
+		res, err := parseToTimestamp(value.(string))
+		if err != nil {
+			return err
+		}
+		params.Set("end", fmt.Sprintf("%d", res))
+	}
+	queryURL := currency.Address + LokiAddressPath + params.Encode()
+
+	// Send GET request to Loki
+	resp, err := http.Get(queryURL)
+	if err != nil {
+		return fmt.Errorf("error sending request to Loki: %v", err)
+	}
+	defer func(Body io.ReadCloser) {
+		err := Body.Close()
+		if err != nil {
+			tool.Logger.Errorf("Failed to close response body: %v", err)
+		}
+	}(resp.Body)
+
+	// Read the response body
+	body, err := ioutil.ReadAll(resp.Body)
+	if err != nil {
+		return fmt.Errorf("error reading response from Loki: %v", err)
+	}
+
+	// Parse the JSON response
+	var result LokiQueryResult
+	err = json.Unmarshal(body, &result)
+	if err != nil {
+		return fmt.Errorf("error parsing Loki response: %v", err)
+	}
+
+	// Process and print logs
+	if result.Status == "success" {
+		if len(result.Data.Result) == 0 {
+			return fmt.Errorf("loki query returned no results")
+		}
+		for _, stream := range result.Data.Result {
+			for _, entry := range stream.Values {
+				// Extract timestamp and log message
+				value := entry[1]
+				// Print the readable timestamp and log message
+				if strings.Contains(value, "INFO") {
+					tool.Logger.Info(fmt.Sprintf("%v", value))
+				}
+				if strings.Contains(value, "ERROR") {
+					tool.Logger.Error(fmt.Sprintf("%v", value))
+				}
+				if strings.Contains(value, "WARN") {
+					tool.Logger.Warn(fmt.Sprintf("%v", value))
+				}
+			}
+		}
+	} else {
+		fmt.Printf("Query failed, status: %s\n", result.Status)
+	}
+	return nil
+}
+
+// parseToTimestamp parses a time string to a Unix nanosecond timestamp
+func parseToTimestamp(timeStr string) (int64, error) {
+	// Load the specified time zone (UTC in this case)
+	loc, err := time.LoadLocation("UTC")
+	if err != nil {
+		return 0, fmt.Errorf("failed to load timezone: %v", err)
+	}
+
+	// Parse the time string using the specified layout and timezone
+	t, err := time.ParseInLocation(TimeLayout, timeStr, loc)
+	if err != nil {
+		return 0, fmt.Errorf("failed to parse time: %v", err)
+	}
+
+	// Convert to Unix nanosecond timestamp
+	timestamp := t.UnixNano()
+	return timestamp, nil
+}
diff --git a/action/log/logadapter/types.go b/action/log/logadapter/types.go
new file mode 100644
index 0000000..58035f4
--- /dev/null
+++ b/action/log/logadapter/types.go
@@ -0,0 +1,53 @@
+package logadapter
+
+import "time"
+
+type Elasticsearch struct{}
+
+type Loki struct{}
+
+type Local struct{}
+
+type Currency struct {
+	Address  string `json:"address"`
+	Source   string `json:"source"`
+	Username string `json:"username"`
+	Password string `json:"password"`
+	Index    string `json:"index"`
+}
+
+type SeataLog struct {
+	Timestamp  time.Time // Timestamp
+	LogLevel   string    // Log level, e.g., INFO, ERROR, etc.
+	Module     string    // Log module, e.g., RMHandler, UndoLogManager, etc.
+	XID        string    // Global transaction ID
+	BranchID   string    // Branch transaction ID
+	ResourceID string    // Resource ID
+	Message    string    // Log content
+}
+
+// LokiQueryResult represents the structure of the response from Loki
+type LokiQueryResult struct {
+	Status string `json:"status"`
+	Data   struct {
+		ResultType string `json:"resultType"`
+		Result     []struct {
+			Stream map[string]string `json:"stream"`
+			Values [][]string        `json:"values"`
+		} `json:"result"`
+	} `json:"data"`
+}
+
+// LogData represents a single log entry
+type LogData struct {
+	Timestamp  string `json:"timestamp"`
+	LogLevel   string `json:"log_level"`
+	LogMessage string `json:"log_message"`
+}
+
+// QueryResponse holds the response structure from the /query API
+type QueryResponse struct {
+	ApplicationID string    `json:"application_id"`
+	LogLevel      string    `json:"log_level"`
+	Logs          []LogData `json:"logs"`
+}
diff --git a/action/login/login.go b/action/login/login.go
new file mode 100644
index 0000000..5cf6141
--- /dev/null
+++ b/action/login/login.go
@@ -0,0 +1,45 @@
+package login
+
+import (
+	"fmt"
+	"github.com/seata/seata-ctl/seata"
+	"github.com/spf13/cobra"
+	"github.com/spf13/viper"
+	"os"
+)
+
+var Address string
+
+// LoginCmd 定义 login 子命令
+var LoginCmd = &cobra.Command{
+	Use:   "login",
+	Short: "Login to Seata server",
+	Run: func(cmd *cobra.Command, args []string) {
+		fmt.Println("Attempting to login...")
+		Address = seata.GetAuth().GetAddress()
+		err := seata.GetAuth().Login()
+		if err != nil {
+			fmt.Println("Login failed!")
+			os.Exit(1)
+		} else {
+			fmt.Printf("Login successful to address: %s\n", Address)
+			printPrompt(Address)
+		}
+	},
+}
+
+func init() {
+	credential := seata.GetAuth()
+	LoginCmd.PersistentFlags().StringVar(&credential.ServerIP, "ip", "127.0.0.1", "Seata Server IP")
+	LoginCmd.PersistentFlags().IntVar(&credential.ServerPort, "port", 7091, "Seata Server Admin Port")
+	LoginCmd.PersistentFlags().StringVar(&credential.Username, "username", "seata", "Username")
+	LoginCmd.PersistentFlags().StringVar(&credential.Password, "password", "seata", "Password")
+	viper.BindPFlag("ip", LoginCmd.PersistentFlags().Lookup("ip"))
+	viper.BindPFlag("port", LoginCmd.PersistentFlags().Lookup("port"))
+	viper.BindPFlag("username", LoginCmd.PersistentFlags().Lookup("username"))
+	viper.BindPFlag("password", LoginCmd.PersistentFlags().Lookup("password"))
+}
+
+func printPrompt(address string) {
+	fmt.Printf("%s > ", address)
+}
diff --git a/action/prometheus/common.go b/action/prometheus/common.go
new file mode 100644
index 0000000..10f60eb
--- /dev/null
+++ b/action/prometheus/common.go
@@ -0,0 +1,9 @@
+package prometheus
+
+const (
+	DefaultPromTarget = "seata_transaction_summary"
+)
+
+var (
+	Target string
+)
diff --git a/action/prometheus/metrics.go b/action/prometheus/metrics.go
new file mode 100644
index 0000000..9030cba
--- /dev/null
+++ b/action/prometheus/metrics.go
@@ -0,0 +1,153 @@
+package prometheus
+
+import (
+	"encoding/json"
+	"fmt"
+	"github.com/guptarohit/asciigraph"
+	"github.com/seata/seata-ctl/action/k8s/utils"
+	"github.com/seata/seata-ctl/model"
+	"github.com/seata/seata-ctl/tool"
+	"github.com/spf13/cobra"
+	"gopkg.in/yaml.v3"
+	"io"
+	"io/ioutil"
+	"net/http"
+	"net/url"
+	"os"
+	"strconv"
+)
+
+var MetricsCmd = &cobra.Command{
+	Use:   "metrics",
+	Short: "Show Prometheus metrics",
+	Run: func(cmd *cobra.Command, args []string) {
+		if err := showMetrics(); err != nil {
+			tool.Logger.Errorf("Failed to show metrics: %v", err)
+		}
+	},
+}
+
+func init() {
+	MetricsCmd.PersistentFlags().StringVar(&Target, "target", DefaultPromTarget, "seata prometheus metrics name")
+}
+
+// showMetrics executes the metrics collection and chart generation
+func showMetrics() error {
+	prometheusURL, err := getPrometheusAddress()
+	if err != nil {
+		return err
+	}
+
+	// Query Prometheus for metrics
+	result, err := queryPromMetric(prometheusURL, Target)
+	if err != nil {
+		return fmt.Errorf("query prometheus metrics: %v", err)
+	}
+
+	// Generate terminal chart from the queried results
+	if err = generateTerminalLineChart(result, Target); err != nil {
+		return err
+	}
+	return nil
+}
+
+// getPrometheusAddress fetches Prometheus server address from configuration
+func getPrometheusAddress() (string, error) {
+	file, err := os.ReadFile(utils.ConfigFileName)
+	if err != nil {
+		return "", fmt.Errorf("failed to read config.yml: %v", err)
+	}
+
+	// Parse the configuration
+	var config model.Config
+	if err = yaml.Unmarshal(file, &config); err != nil {
+		return "", fmt.Errorf("failed to unmarshal YAML: %v", err)
+	}
+
+	// Extract Prometheus address based on context
+	contextName := config.Context.Prometheus
+	var contextPath string
+	for _, server := range config.Prometheus.Servers {
+		if server.Name == contextName {
+			contextPath = server.Address
+		}
+	}
+	if contextPath == "" {
+		return "", fmt.Errorf("failed to find Prometheus context in config.yml")
+	}
+	return contextPath, nil
+}
+
+// PromResponse defines the structure of a Prometheus query response
+type PromResponse struct {
+	Status string `json:"status"`
+	Data   struct {
+		ResultType string `json:"resultType"`
+		Result     []struct {
+			Metric map[string]string `json:"metric"`
+			Value  []interface{}     `json:"value"`
+		} `json:"result"`
+	} `json:"data"`
+}
+
+// queryPromsMetric sends a query to the Prometheus API and returns the response
+func queryPromMetric(prometheusURL, query string) (*PromResponse, error) {
+	queryURL := fmt.Sprintf("%s/api/v1/query?query=%s", prometheusURL, url.QueryEscape(query))
+	resp, err := http.Get(queryURL)
+	if err != nil {
+		return nil, fmt.Errorf("error querying Prometheus: %w", err)
+	}
+	defer func(Body io.ReadCloser) {
+		err := Body.Close()
+		if err != nil {
+			tool.Logger.Errorf("failed to close response body: %v", err)
+			return
+		}
+	}(resp.Body)
+
+	// Read the response body
+	body, err := ioutil.ReadAll(resp.Body)
+	if err != nil {
+		return nil, fmt.Errorf("error reading response body: %w", err)
+	}
+
+	// Parse JSON response into the PrometheusResponse structure
+	var result PromResponse
+	if err := json.Unmarshal(body, &result); err != nil {
+		return nil, fmt.Errorf("error unmarshalling JSON: %w", err)
+	}
+	return &result, nil
+}
+
+// generateTerminalLineChart generates and prints an ASCII line chart based on the Prometheus response
+func generateTerminalLineChart(response *PromResponse, metricName string) error {
+	var yValues []float64
+
+	// Iterate over the results and extract the values for the specified metric
+	for _, result := range response.Data.Result {
+		if name, ok := result.Metric["__name__"]; ok && name == metricName {
+			// Parse the metric value
+			if valueStr, ok := result.Value[1].(string); ok {
+				value, err := strconv.ParseFloat(valueStr, 64)
+				if err != nil {
+					return fmt.Errorf("error converting value to float: %v", err)
+				} else {
+					yValues = append(yValues, value)
+				}
+			} else {
+				return fmt.Errorf("error converting value to float: %v", result.Value[1])
+			}
+		}
+	}
+
+	// Check if any values were found
+	if len(yValues) == 0 {
+		return fmt.Errorf("no data found for metric: %s", metricName)
+	}
+
+	// Generate and display the ASCII line chart
+	graph := asciigraph.Plot(yValues, asciigraph.Width(50), asciigraph.Height(10), asciigraph.Caption(metricName))
+
+	tool.Logger.Infof(graph)
+	return nil
+}
diff --git a/action/root.go b/action/root.go
index 3570549..b8949c6 100644
--- a/action/root.go
+++ b/action/root.go
@@ -19,7 +19,12 @@ package action
 
 import (
 	"github.com/seata/seata-ctl/action/common"
+	"github.com/seata/seata-ctl/action/config"
 	"github.com/seata/seata-ctl/action/get"
+	"github.com/seata/seata-ctl/action/k8s"
+	"github.com/seata/seata-ctl/action/log"
+	"github.com/seata/seata-ctl/action/login"
+	"github.com/seata/seata-ctl/action/prometheus"
 	"github.com/seata/seata-ctl/action/reload"
 	se "github.com/seata/seata-ctl/action/set"
 	del "github.com/seata/seata-ctl/action/try"
@@ -27,9 +32,23 @@ import (
 )
 
 func init() {
-	rootCmd.AddCommand(quitCmd,
-		get.GetCmd, del.TryCmd,
-		reload.ReloadCmd, se.SetCmd)
+	rootCmd.AddCommand(
+		quitCmd,
+		login.LoginCmd,
+		get.GetCmd,
+		del.TryCmd,
+		reload.ReloadCmd,
+		se.SetCmd,
+		config.ConfigCmd,
+		k8s.DeployCmd,
+		k8s.UnDeployCmd,
+		k8s.InstallCmd,
+		k8s.UnInstallCmd,
+		k8s.StatusCmd,
+		k8s.ScaleCmd,
+		prometheus.MetricsCmd,
+		log.LogCmd,
+	)
 	rootCmd.SetHelpTemplate(common.GetHelpTmplWithOnlyAvailableCmd())
 	rootCmd.CompletionOptions = cobra.CompletionOptions{
 		DisableDefaultCmd:   true,
diff --git a/cmd/root.go b/cmd/root.go
index c59204d..a32bc82 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -19,13 +19,13 @@ package cmd
 
 import (
 	"fmt"
+	"github.com/seata/seata-ctl/action/login"
+	"github.com/seata/seata-ctl/tool"
 	"os"
 
 	"github.com/seata/seata-ctl/action"
 	"github.com/seata/seata-ctl/action/common"
-	"github.com/seata/seata-ctl/seata"
 	"github.com/spf13/cobra"
-	"github.com/spf13/viper"
 )
 
 var (
@@ -39,15 +39,6 @@ var (
 )
 
 func init() {
-	credential := seata.GetAuth()
-	rootCmd.PersistentFlags().StringVar(&credential.ServerIP, "ip", "127.0.0.1", "Seata Server IP")
-	rootCmd.PersistentFlags().IntVar(&credential.ServerPort, "port", 7091, "Seata Server Admin Port")
-	rootCmd.PersistentFlags().StringVar(&credential.Username, "username", "seata", "Username")
-	rootCmd.PersistentFlags().StringVar(&credential.Password, "password", "seata", "Password")
-	viper.BindPFlag("ip", rootCmd.PersistentFlags().Lookup("ip"))
-	viper.BindPFlag("port", rootCmd.PersistentFlags().Lookup("port"))
-	viper.BindPFlag("username", rootCmd.PersistentFlags().Lookup("username"))
-	viper.BindPFlag("password", rootCmd.PersistentFlags().Lookup("password"))
 	rootCmd.SetHelpCommand(&cobra.Command{
 		Use:   "seata-ctl",
 		Short: "seata-ctl is a CLI tool for Seata",
@@ -61,6 +52,7 @@ func init() {
 		DisableDescriptions: true,
 		HiddenDefaultCmd:    true,
 	}
+
 }
 
 func Execute() {
@@ -68,20 +60,21 @@ func Execute() {
 		fmt.Fprintln(os.Stderr, err)
 		os.Exit(1)
 	}
+
+	tool.InitLogger()
+
+	var address = ""
+
 	for _, arg := range os.Args {
 		if arg == "-h" || arg == "--help" || arg == "version" {
 			os.Exit(0)
 		}
 	}
-	address := seata.GetAuth().GetAddress()
-	err := seata.GetAuth().Login()
-	if err != nil {
-		fmt.Println("login failed!")
-		os.Exit(1)
-	}
-
+	var err error
 	for {
-		printPrompt(address)
+		if login.Address != "" {
+			printPrompt(address)
+		}
 		err = common.ReadArgs(os.Stdin)
 		if err != nil {
 			fmt.Println(err)
diff --git a/config.yml b/config.yml
new file mode 100644
index 0000000..9257f47
--- /dev/null
+++ b/config.yml
@@ -0,0 +1,40 @@
+kubernetes:
+  clusters:
+    - name: "cluster1"
+      kubeconfigpath: "/Users/wpy/.kube/config"
+      ymlpath: ""
+    - name: "seata"
+      kubeconfigpath: "/Users/wpy/Documents/Kubernetes/remotekube.txt"
+      ymlpath: ""
+prometheus:
+  servers:
+    - name: "prometheus"
+      address: "http://localhost:9092"
+      auth: ""
+log:
+  clusters:
+    - name: "es"
+      types: "ElasticSearch"
+      address: "https://localhost:9200"
+      source: "logstash-2024.10.24"
+      username: "elastic"
+      password: "bu4AC50REtt_7rUqddMe"
+      index: "log"
+    - name: "loki"
+      types: "Loki"
+      address: "http://localhost:3100"
+      source: ""
+      username: ""
+      password: ""
+      index: ""
+    - name: "local"
+      types: "Local"
+      address: "http://localhost:8080"
+      source: "seata"
+      username: ""
+      password: ""
+      index: ""
+context:
+  kubernetes: "cluster1"
+  prometheus: "prometheus"
+  log: "local"
\ No newline at end of file
diff --git a/go.mod b/go.mod
index c537646..a0001ea 100644
--- a/go.mod
+++ b/go.mod
@@ -1,32 +1,79 @@
 module github.com/seata/seata-ctl
 
-go 1.19
+go 1.23.1
 
 require (
+	github.com/elastic/go-elasticsearch/v8 v8.15.0
+	github.com/guptarohit/asciigraph v0.7.3
 	github.com/jedib0t/go-pretty/v6 v6.4.7
-	github.com/spf13/cobra v1.7.0
+	github.com/olivere/elastic/v7 v7.0.32
+	github.com/sirupsen/logrus v1.9.3
+	github.com/spf13/cobra v1.8.1
 	github.com/spf13/viper v1.16.0
-	github.com/stretchr/testify v1.8.4
+	github.com/stretchr/testify v1.9.0
+	gopkg.in/yaml.v3 v3.0.1
+	k8s.io/api v0.31.2
+	k8s.io/apiextensions-apiserver v0.31.2
+	k8s.io/apimachinery v0.31.2
+	k8s.io/client-go v0.31.2
+	sigs.k8s.io/yaml v1.4.0
 )
 
 require (
-	github.com/davecgh/go-spew v1.1.1 // indirect
-	github.com/fsnotify/fsnotify v1.6.0 // indirect
+	github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
+	github.com/elastic/elastic-transport-go/v8 v8.6.0 // indirect
+	github.com/emicklei/go-restful/v3 v3.11.0 // indirect
+	github.com/fsnotify/fsnotify v1.7.0 // indirect
+	github.com/fxamacker/cbor/v2 v2.7.0 // indirect
+	github.com/go-logr/logr v1.4.2 // indirect
+	github.com/go-logr/stdr v1.2.2 // indirect
+	github.com/go-openapi/jsonpointer v0.19.6 // indirect
+	github.com/go-openapi/jsonreference v0.20.2 // indirect
+	github.com/go-openapi/swag v0.22.4 // indirect
+	github.com/gogo/protobuf v1.3.2 // indirect
+	github.com/golang/protobuf v1.5.4 // indirect
+	github.com/google/gnostic-models v0.6.8 // indirect
+	github.com/google/go-cmp v0.6.0 // indirect
+	github.com/google/gofuzz v1.2.0 // indirect
+	github.com/google/uuid v1.6.0 // indirect
 	github.com/hashicorp/hcl v1.0.0 // indirect
+	github.com/imdario/mergo v0.3.6 // indirect
 	github.com/inconshreveable/mousetrap v1.1.0 // indirect
+	github.com/josharian/intern v1.0.0 // indirect
+	github.com/json-iterator/go v1.1.12 // indirect
 	github.com/magiconair/properties v1.8.7 // indirect
+	github.com/mailru/easyjson v0.7.7 // indirect
 	github.com/mattn/go-runewidth v0.0.13 // indirect
 	github.com/mitchellh/mapstructure v1.5.0 // indirect
+	github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+	github.com/modern-go/reflect2 v1.0.2 // indirect
+	github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
 	github.com/pelletier/go-toml/v2 v2.0.8 // indirect
-	github.com/pmezard/go-difflib v1.0.0 // indirect
+	github.com/pkg/errors v0.9.1 // indirect
+	github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
 	github.com/rivo/uniseg v0.2.0 // indirect
 	github.com/spf13/afero v1.9.5 // indirect
 	github.com/spf13/cast v1.5.1 // indirect
 	github.com/spf13/jwalterweatherman v1.1.0 // indirect
 	github.com/spf13/pflag v1.0.5 // indirect
 	github.com/subosito/gotenv v1.4.2 // indirect
-	golang.org/x/sys v0.14.0 // indirect
-	golang.org/x/text v0.9.0 // indirect
+	github.com/x448/float16 v0.8.4 // indirect
+	go.opentelemetry.io/otel v1.28.0 // indirect
+	go.opentelemetry.io/otel/metric v1.28.0 // indirect
+	go.opentelemetry.io/otel/trace v1.28.0 // indirect
+	golang.org/x/net v0.26.0 // indirect
+	golang.org/x/oauth2 v0.21.0 // indirect
+	golang.org/x/sys v0.21.0 // indirect
+	golang.org/x/term v0.21.0 // indirect
+	golang.org/x/text v0.16.0 // indirect
+	golang.org/x/time v0.3.0 // indirect
+	google.golang.org/protobuf v1.34.2 // indirect
+	gopkg.in/inf.v0 v0.9.1 // indirect
 	gopkg.in/ini.v1 v1.67.0 // indirect
-	gopkg.in/yaml.v3 v3.0.1 // indirect
+	gopkg.in/yaml.v2 v2.4.0 // indirect
+	k8s.io/klog/v2 v2.130.1 // indirect
+	k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
+	k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
+	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
+	sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
 )
diff --git a/go.sum b/go.sum
index 0378c44..f2bea78 100644
--- a/go.sum
+++ b/go.sum
@@ -46,22 +46,51 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
 github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
 github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
 github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
-github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
+github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
+github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
+github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/elastic/elastic-transport-go/v8 v8.6.0 h1:Y2S/FBjx1LlCv5m6pWAF2kDJAHoSjSRSJCApolgfthA=
+github.com/elastic/elastic-transport-go/v8 v8.6.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk=
+github.com/elastic/go-elasticsearch/v8 v8.15.0 h1:IZyJhe7t7WI3NEFdcHnf6IJXqpRf+8S8QWLtZYYyBYk=
+github.com/elastic/go-elasticsearch/v8 v8.15.0/go.mod h1:HCON3zj4btpqs2N1jjsAy4a/fiAul+YBP00mBH4xik8=
+github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g=
+github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
 github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
 github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
 github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
 github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
 github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
 github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
+github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
+github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
 github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=
-github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
-github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
+github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
+github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
+github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
+github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E=
+github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
 github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
+github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
+github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
+github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
+github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
+github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
+github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE=
+github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs=
+github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE=
+github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k=
+github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
+github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU=
+github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
+github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
+github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
+github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
+github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
 github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
 github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
@@ -87,8 +116,12 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq
 github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
 github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
 github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
+github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
 github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
 github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
+github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I=
+github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U=
 github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
 github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
 github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
@@ -98,7 +131,12 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
 github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
+github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
+github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
+github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
 github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
 github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
@@ -112,55 +150,91 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf
 github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
 github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
 github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2Rrd27c3VGxi6a/6HNq8QmHRKM=
+github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=
 github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
 github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
+github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
 github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
 github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
+github.com/guptarohit/asciigraph v0.7.3 h1:p05XDDn7cBTWiBqWb30mrwxd6oU0claAjqeytllnsPY=
+github.com/guptarohit/asciigraph v0.7.3/go.mod h1:dYl5wwK4gNsnFf9Zp+l06rFiDZ5YtXM6x7SRWZ3KGag=
 github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
 github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
 github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
 github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
 github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
 github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
+github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28=
+github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
 github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
 github.com/jedib0t/go-pretty/v6 v6.4.7 h1:lwiTJr1DEkAgzljsUsORmWsVn5MQjt1BPJdPCtJ6KXE=
 github.com/jedib0t/go-pretty/v6 v6.4.7/go.mod h1:Ndk3ase2CkQbXLLNf5QDHoYb6J9WtVfmHZu9n8rk2xs=
+github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
+github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
+github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
+github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
 github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
+github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
 github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
 github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
 github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
 github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
+github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
 github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
 github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
 github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
+github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
 github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
 github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
+github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
+github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
 github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
 github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
 github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
 github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
+github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
+github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
+github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
+github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
+github.com/olivere/elastic/v7 v7.0.32 h1:R7CXvbu8Eq+WlsLgxmKVKPox0oOwAE/2T9Si5BnvK6E=
+github.com/olivere/elastic/v7 v7.0.32/go.mod h1:c7PVmLe3Fxq77PIfY/bZmxY/TAamBhCzZ8xDOE09a9k=
+github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA=
+github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To=
+github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw=
+github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro=
 github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ=
 github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4=
+github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
 github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pkg/profile v1.6.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18=
 github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
+github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
 github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
 github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
 github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
 github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
-github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
+github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
+github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
 github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
+github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
 github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM=
 github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ=
 github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA=
 github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48=
-github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
-github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
+github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
+github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
 github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
 github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
 github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
@@ -171,17 +245,21 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
 github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
 github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
 github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
 github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
 github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
 github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
 github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
 github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
 github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
+github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
 github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
-github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
-github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
+github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
+github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
 github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8=
 github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
+github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
+github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
 github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
 github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
 github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -192,6 +270,14 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
 go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
 go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
 go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
+go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo=
+go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4=
+go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q=
+go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s=
+go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE=
+go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg=
+go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g=
+go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
@@ -264,6 +350,8 @@ golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v
 golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
 golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
 golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
+golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
 golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
 golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
 golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -273,6 +361,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ
 golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
 golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
 golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs=
+golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
 golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -318,11 +408,13 @@ golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
-golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
+golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA=
+golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0=
 golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -331,11 +423,13 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
-golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
-golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
+golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
+golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
 golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
+golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
@@ -373,6 +467,7 @@ golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roY
 golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
 golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
 golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
 golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
 golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
 golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
@@ -381,8 +476,11 @@ golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4f
 golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
 golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
 golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
 golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
 golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg=
+golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -475,13 +573,21 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
 google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
 google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
+google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
+google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
 gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
+gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
+gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
 gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
 gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
 gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
 gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
@@ -492,6 +598,26 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
 honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
 honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
+k8s.io/api v0.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0=
+k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk=
+k8s.io/apiextensions-apiserver v0.31.2 h1:W8EwUb8+WXBLu56ser5IudT2cOho0gAKeTOnywBLxd0=
+k8s.io/apiextensions-apiserver v0.31.2/go.mod h1:i+Geh+nGCJEGiCGR3MlBDkS7koHIIKWVfWeRFiOsUcM=
+k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw=
+k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo=
+k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc=
+k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs=
+k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
+k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
+k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag=
+k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98=
+k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A=
+k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
 rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
 rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
+sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
+sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
+sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4=
+sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08=
+sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
+sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
diff --git a/model/config.go b/model/config.go
new file mode 100644
index 0000000..f63c080
--- /dev/null
+++ b/model/config.go
@@ -0,0 +1,49 @@
+package model
+
+type Config struct {
+	Kubernetes Kubernetes `yaml:"kubernetes"`
+	Prometheus Prometheus `yaml:"prometheus"`
+	Log        Log        `yaml:"log"`
+	Context    Context    `yaml:"context"`
+}
+
+type Kubernetes struct {
+	Cluster []KubernetesCluster `yaml:"clusters"`
+}
+
+type Prometheus struct {
+	Servers []Server `yaml:"servers,omitempty"`
+}
+
+type Log struct {
+	Clusters []Cluster `yaml:"clusters"`
+}
+
+// Context Select the appropriate configuration based on the Context field
+type Context struct {
+	Kubernetes string `yaml:"kubernetes"`
+	Prometheus string `yaml:"prometheus"`
+	Log        string `yaml:"log"`
+}
+
+type KubernetesCluster struct {
+	Name           string `yaml:"name"`
+	KubeConfigPath string `yaml:"kubeconfigpath"`
+	YmlPath        string `yaml:"ymlpath"`
+}
+
+type Server struct {
+	Name    string `yaml:"name"`
+	Address string `yaml:"address"`
+	Auth    string `yaml:"auth"`
+}
+
+type Cluster struct {
+	Name     string `yaml:"name"`
+	Types    string `yaml:"types"`
+	Address  string `yaml:"address"`
+	Source   string `yaml:"source"`
+	Username string `yaml:"username"`
+	Password string `yaml:"password"`
+	Index    string `yaml:"index"`
+}
diff --git a/seata.yaml b/seata.yaml
new file mode 100644
index 0000000..3750c99
--- /dev/null
+++ b/seata.yaml
@@ -0,0 +1,390 @@
+---
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+  annotations:
+    controller-gen.kubebuilder.io/version: v0.13.0
+  name: seataservers.operator.seata.apache.org
+spec:
+  group: operator.seata.apache.org
+  names:
+    kind: SeataServer
+    listKind: SeataServerList
+    plural: seataservers
+    singular: seataserver
+  scope: Namespaced
+  versions:
+  - name: v1alpha1
+    schema:
+      openAPIV3Schema:
+        description: SeataServer is the Schema for the seataservers API
+        properties:
+          apiVersion:
+            description: 'APIVersion defines the versioned schema of this representation
+              of an object. Servers should convert recognized schemas to the latest
+              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+            type: string
+          kind:
+            description: 'Kind is a string value representing the REST resource this
+              object represents. Servers may infer this from the endpoint the client
+              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+            type: string
+          metadata:
+            type: object
+          spec:
+            description: SeataServerSpec defines the desired state of SeataServer
+            properties:
+              containerName:
+                default: seata-server
+                type: string
+              env:
+                additionalProperties:
+                  type: string
+                type: object
+              image:
+                type: string
+              ports:
+                properties:
+                  consolePort:
+                    default: 7091
+                    format: int32
+                    type: integer
+                  raftPort:
+                    default: 9091
+                    format: int32
+                    type: integer
+                  servicePort:
+                    default: 8091
+                    format: int32
+                    type: integer
+                type: object
+              replicas:
+                default: 1
+                format: int32
+                minimum: 1
+                type: integer
+              resources:
+                description: ResourceRequirements describes the compute resource requirements.
+                properties:
+                  claims:
+                    description: "Claims lists the names of resources, defined in
+                      spec.resourceClaims, that are used by this container. \n This
+                      is an alpha field and requires enabling the DynamicResourceAllocation
+                      feature gate. \n This field is immutable. It can only be set
+                      for containers."
+                    items:
+                      description: ResourceClaim references one entry in PodSpec.ResourceClaims.
+                      properties:
+                        name:
+                          description: Name must match the name of one entry in pod.spec.resourceClaims
+                            of the Pod where this field is used. It makes that resource
+                            available inside a container.
+                          type: string
+                      required:
+                      - name
+                      type: object
+                    type: array
+                    x-kubernetes-list-map-keys:
+                    - name
+                    x-kubernetes-list-type: map
+                  limits:
+                    additionalProperties:
+                      anyOf:
+                      - type: integer
+                      - type: string
+                      pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+                      x-kubernetes-int-or-string: true
+                    description: 'Limits describes the maximum amount of compute resources
+                      allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+                    type: object
+                  requests:
+                    additionalProperties:
+                      anyOf:
+                      - type: integer
+                      - type: string
+                      pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+                      x-kubernetes-int-or-string: true
+                    description: 'Requests describes the minimum amount of compute
+                      resources required. If Requests is omitted for a container,
+                      it defaults to Limits if that is explicitly specified, otherwise
+                      to an implementation-defined value. Requests cannot exceed Limits.
+                      More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+                    type: object
+                type: object
+              serviceName:
+                default: seata-server
+                type: string
+              store:
+                properties:
+                  resources:
+                    description: ResourceRequirements describes the compute resource
+                      requirements.
+                    properties:
+                      claims:
+                        description: "Claims lists the names of resources, defined
+                          in spec.resourceClaims, that are used by this container.
+                          \n This is an alpha field and requires enabling the DynamicResourceAllocation
+                          feature gate. \n This field is immutable. It can only be
+                          set for containers."
+                        items:
+                          description: ResourceClaim references one entry in PodSpec.ResourceClaims.
+                          properties:
+                            name:
+                              description: Name must match the name of one entry in
+                                pod.spec.resourceClaims of the Pod where this field
+                                is used. It makes that resource available inside a
+                                container.
+                              type: string
+                          required:
+                          - name
+                          type: object
+                        type: array
+                        x-kubernetes-list-map-keys:
+                        - name
+                        x-kubernetes-list-type: map
+                      limits:
+                        additionalProperties:
+                          anyOf:
+                          - type: integer
+                          - type: string
+                          pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+                          x-kubernetes-int-or-string: true
+                        description: 'Limits describes the maximum amount of compute
+                          resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+                        type: object
+                      requests:
+                        additionalProperties:
+                          anyOf:
+                          - type: integer
+                          - type: string
+                          pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+                          x-kubernetes-int-or-string: true
+                        description: 'Requests describes the minimum amount of compute
+                          resources required. If Requests is omitted for a container,
+                          it defaults to Limits if that is explicitly specified, otherwise
+                          to an implementation-defined value. Requests cannot exceed
+                          Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+                        type: object
+                    type: object
+                required:
+                - resources
+                type: object
+            required:
+            - image
+            - store
+            type: object
+          status:
+            description: SeataServerStatus defines the observed state of SeataServer
+            properties:
+              readyReplicas:
+                format: int32
+                type: integer
+              replicas:
+                format: int32
+                type: integer
+              synchronized:
+                type: boolean
+            required:
+            - replicas
+            - synchronized
+            type: object
+        type: object
+    served: true
+    storage: true
+    subresources:
+      status: {}
+---
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+  annotations:
+    controller-gen.kubebuilder.io/version: v0.13.0
+  name: seataservers.operator.seata.apache.org
+spec:
+  group: operator.seata.apache.org
+  names:
+    kind: SeataServer
+    listKind: SeataServerList
+    plural: seataservers
+    singular: seataserver
+  scope: Namespaced
+  versions:
+    - name: v1alpha1
+      schema:
+        openAPIV3Schema:
+          description: SeataServer is the Schema for the seataservers API
+          properties:
+            apiVersion:
+              description: 'APIVersion defines the versioned schema of this representation
+              of an object. Servers should convert recognized schemas to the latest
+              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+              type: string
+            kind:
+              description: 'Kind is a string value representing the REST resource this
+              object represents. Servers may infer this from the endpoint the client
+              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+              type: string
+            metadata:
+              type: object
+            spec:
+              description: SeataServerSpec defines the desired state of SeataServer
+              properties:
+                containerName:
+                  default: seata-server
+                  type: string
+                env:
+                  additionalProperties:
+                    type: string
+                  type: object
+                image:
+                  type: string
+                ports:
+                  properties:
+                    consolePort:
+                      default: 7091
+                      format: int32
+                      type: integer
+                    raftPort:
+                      default: 9091
+                      format: int32
+                      type: integer
+                    servicePort:
+                      default: 8091
+                      format: int32
+                      type: integer
+                  type: object
+                replicas:
+                  default: 1
+                  format: int32
+                  minimum: 1
+                  type: integer
+                resources:
+                  description: ResourceRequirements describes the compute resource requirements.
+                  properties:
+                    claims:
+                      description: "Claims lists the names of resources, defined in
+                      spec.resourceClaims, that are used by this container. \n This
+                      is an alpha field and requires enabling the DynamicResourceAllocation
+                      feature gate. \n This field is immutable. It can only be set
+                      for containers."
+                      items:
+                        description: ResourceClaim references one entry in PodSpec.ResourceClaims.
+                        properties:
+                          name:
+                            description: Name must match the name of one entry in pod.spec.resourceClaims
+                              of the Pod where this field is used. It makes that resource
+                              available inside a container.
+                            type: string
+                        required:
+                          - name
+                        type: object
+                      type: array
+                      x-kubernetes-list-map-keys:
+                        - name
+                      x-kubernetes-list-type: map
+                    limits:
+                      additionalProperties:
+                        anyOf:
+                          - type: integer
+                          - type: string
+                        pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+                        x-kubernetes-int-or-string: true
+                      description: 'Limits describes the maximum amount of compute resources
+                      allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+                      type: object
+                    requests:
+                      additionalProperties:
+                        anyOf:
+                          - type: integer
+                          - type: string
+                        pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+                        x-kubernetes-int-or-string: true
+                      description: 'Requests describes the minimum amount of compute
+                      resources required. If Requests is omitted for a container,
+                      it defaults to Limits if that is explicitly specified, otherwise
+                      to an implementation-defined value. Requests cannot exceed Limits.
+                      More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+                      type: object
+                  type: object
+                serviceName:
+                  default: seata-server
+                  type: string
+                store:
+                  properties:
+                    resources:
+                      description: ResourceRequirements describes the compute resource
+                        requirements.
+                      properties:
+                        claims:
+                          description: "Claims lists the names of resources, defined
+                          in spec.resourceClaims, that are used by this container.
+                          \n This is an alpha field and requires enabling the DynamicResourceAllocation
+                          feature gate. \n This field is immutable. It can only be
+                          set for containers."
+                          items:
+                            description: ResourceClaim references one entry in PodSpec.ResourceClaims.
+                            properties:
+                              name:
+                                description: Name must match the name of one entry in
+                                  pod.spec.resourceClaims of the Pod where this field
+                                  is used. It makes that resource available inside a
+                                  container.
+                                type: string
+                            required:
+                              - name
+                            type: object
+                          type: array
+                          x-kubernetes-list-map-keys:
+                            - name
+                          x-kubernetes-list-type: map
+                        limits:
+                          additionalProperties:
+                            anyOf:
+                              - type: integer
+                              - type: string
+                            pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+                            x-kubernetes-int-or-string: true
+                          description: 'Limits describes the maximum amount of compute
+                          resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+                          type: object
+                        requests:
+                          additionalProperties:
+                            anyOf:
+                              - type: integer
+                              - type: string
+                            pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+                            x-kubernetes-int-or-string: true
+                          description: 'Requests describes the minimum amount of compute
+                          resources required. If Requests is omitted for a container,
+                          it defaults to Limits if that is explicitly specified, otherwise
+                          to an implementation-defined value. Requests cannot exceed
+                          Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+                          type: object
+                      type: object
+                  required:
+                    - resources
+                  type: object
+              required:
+                - image
+                - store
+              type: object
+            status:
+              description: SeataServerStatus defines the observed state of SeataServer
+              properties:
+                readyReplicas:
+                  format: int32
+                  type: integer
+                replicas:
+                  format: int32
+                  type: integer
+                synchronized:
+                  type: boolean
+              required:
+                - replicas
+                - synchronized
+              type: object
+          type: object
+      served: true
+      storage: true
+      subresources:
+        status: {}
diff --git a/tool/log.go b/tool/log.go
new file mode 100644
index 0000000..d194d65
--- /dev/null
+++ b/tool/log.go
@@ -0,0 +1,20 @@
+package tool
+
+import (
+	"github.com/sirupsen/logrus"
+	"sync"
+)
+
+// Logger Global logger instance
+var Logger *logrus.Logger
+var once sync.Once
+
+// InitLogger initializes the global logger instance
+func InitLogger() *logrus.Logger {
+	once.Do(func() { // Ensures initialization is only done once
+		Logger = logrus.New()
+		Logger.SetFormatter(&logrus.TextFormatter{ForceColors: true})
+		Logger.SetLevel(logrus.InfoLevel)
+	})
+	return Logger
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org