alibabacloud-ack-mcp-server

v1.0.2
alibabacloud-ack-mcp-server Checked 6 hours ago Published 9 months ago

AlibabaCloud Container Service MCP Server (ack-mcp-server)

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_clusters List Clusters

获取所有region下所有ACK集群列表,默认返回最多10个集群

ParameterTypeDescription
page_numinteger查询每个region集群列表的分页页码
page_sizeinteger查询每个region集群列表的分页页码

ack_kubectl Ack Kubectl

Execute kubectl command with intelligent context management for ACK clusters. You MUST use this tool when accessing ACK clusters. Using external shells or any other kubectl entrypoints is NOT allowed. Supports cluster_id for automatic context switching and creation.

ParameterTypeDescription
cluster_id *stringThe ID of the Kubernetes cluster to query. If specified, will auto find/create and switch to appropriate context. If you are not sure of cluster id, please use the list_clusters tool to get it first.
command *stringIMPORTANT POLICY: When accessing ACK clusters, you MUST use this tool. Do NOT invoke kubectl via shell or any external mechanism. Arguments after 'kubectl', e.g. 'get pods -A', 'config get-contexts',…

query_prometheus Query Prometheus

查询一个ACK集群的阿里云Prometheus数据

ParameterTypeDescription
cluster_id *string需要查询的阿里云prometheus所在的ACK集群的clusterId
promql *stringPromQL表达式
end_timeRFC3339或unix时间;与start_time同时提供为range查询;可能需要调用tool get_current_time获取当前时间
start_timeRFC3339或unix时间;与end_time同时提供为range查询; 可能需要调用tool get_current_time获取当前时间
steprange查询步长,如30s

query_prometheus_metric_guidance Query Prometheus Metric Guidance

获取Prometheus指标定义和最佳实践

ParameterTypeDescription
metric_category *string指标分类:cpu/memory/network/disk/state
resource_label *string资源维度label:node/pod/container/deployment/daemonset/job/coredns/ingress/hpa/persistentvolume/mountpoint 等

diagnose_resource Diagnose Resource

对ACK集群的Kubernetes资源进行诊断,当遇到问题难以定位时,使用该工具进行深度诊断。支持诊断的资源包括: 1. **node**:K8s 节点 2. **ingress**:Ingress 3. **memory**:节点内存 4. **pod**:Pod 5. **service**:Service 6. **network**:网络连通性

ParameterTypeDescription
cluster_id *string需要诊断的ACK集群clusterId
resource_target *string用于指定诊断对象的参数,参数必须为合法 JSON 字符串(键和值均用双引号),不得输出多余文字。不同类型示例: node: {"name": "cn-shanghai.10…
resource_type *string诊断的目标资源类型,枚举值:node|ingress|memory|pod|service|network

query_inspect_report Query Inspect Report

即可生成并查询一个ACK集群最近的健康巡检报告

ParameterTypeDescription
cluster_id *string需要查询的prometheus所在的集群clusterId
region_id *string集群所在的regionId
is_result_exceptionboolean是否只返回异常的结果,默认为true

query_audit_log Query Audit Log

Query Kubernetes (k8s) audit logs. Function Description: - Supports multiple time formats (ISO 8601 and relative time). - Supports suffix wildcards for namespace, resource name, and user. - Supports multiple values for verbs and resource types. - Supports both full names and short names for resource types. - Allows specifying the cluster name to query audit logs from multiple clusters. - Provides detailed parameter validation and error messages. Usage Suggestions: - You can use the list_clusters() tool to view available clusters and their IDs. - By def…

ParameterTypeDescription
cluster_id *stringThe name of the cluster to query audit logs from. if you are not sure, use 'list_clusters' tool to get available clusters.
end_time(Optional) Query end time. Formats: - ISO 8601: "2024-01-01T10:00:00Z" - Relative: "30m", "1h", "24h", "7d" Defaults to current time.
limitinteger(Optional) Result limit, defaults to 10. Maximum is 100.
namespace(Optional) Match by namespace. Supports exact matching and suffix wildcards: - Exact match: "default", "kube-system", "kube-public" - Suffix wildcard: "kube*", "app-*" (matches namespaces…
resource_name(Optional) Match by resource name. Supports exact matching and suffix wildcards: - Exact match: "nginx-deployment", "my-service" - Suffix wildcard: "nginx-*", "app-*" (matches resource na…
resource_types(Optional) K8s resource type, multiple values are allowed. Can be a JSON array string like '["deployments", "pods"]'. Supports full names and short names. Common values: - Core: pods(pod),…
start_timestring(Optional) Query start time. Formats: - ISO 8601: "2024-01-01T10:00:00Z" - Relative: "30m", "1h", "24h", "7d" Defaults to 24h.
user(Optional) Match by user name. Supports exact matching and suffix wildcards: - Exact match: "system:admin", "kubernetes-admin" - Suffix wildcard: "system:*", "kube*"
verbs(Optional) Filter by action verbs, multiple values are allowed. Can be a JSON array string like '["create", "update"]'. Common values: - "get": Get a resource - "list": List resources…

get_current_time Get Current Time

获取当前时间,返回 ISO 8601 格式和 Unix 时间戳格式

query_controlplane_logs Query Controlplane Logs

Query ACK cluster control plane component logs. Function Description: - Queries control plane component logs from ACK clusters. - Supports multiple time formats (ISO 8601 and relative time). - Supports additional filter patterns for log filtering. - Validates component availability before querying. - Provides detailed parameter validation and error messages. Usage Suggestions: - You can use the list_clusters() tool to view available clusters and their IDs. - By default, it queries the control plane logs for the last 24 hours. The number of returned records…

ParameterTypeDescription
cluster_id *string集群ID
component_name *string控制面组件的名称,枚举值: apiserver: API Server组件 kcm: KCM组件 scheduler: Scheduler组件 ccm: CCM组件…
end_time(Optional) Query end time. Formats: - ISO 8601: "2024-01-01T10:00:00Z" - Relative: "30m", "1h", "24h", "7d" - Current time: "now" Defaults to current time.
filter_pattern(Optional) Additional filter pattern. Example: - 查询pod相关的日志: "coredns-8bd9456cc-wck2l" Defaults to '*' (all logs).
limitinteger(Optional) Result limit, defaults to 10. Maximum is 100.
start_timestring(Optional) Query start time. Formats: - ISO 8601: "2024-01-01T10:00:00Z" - Relative: "30m", "1h", "24h", "7d" - Current time: "now" Defaults to 24h.

analyze_workload_cost Analyze Workload Cost

分析特定工作负载的资源使用情况和成本优化建议。 ## 使用场景 - 分析单个工作负载的资源配置和实时使用情况 - 评估资源利用率(实际使用 vs requests) - 获取资源画像推荐配置(如果启用) ## 注意事项 - 利用率可能超过 100%,表示实际使用超过 request 配置 - resource_recommendation 为 null 表示未启用资源画像或没有推荐数据

ParameterTypeDescription
cluster_id *string集群 ID
namespace *string命名空间名称
workload_name *string工作负载名称
workload_type *string工作负载类型