用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/aws-samples/sample-skills-for-AWS-Devops-agent --skill use-eks-via-call-kubectl命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | use-eks-via-call-kubectl |
| description | Use when any task involves inspecting EKS pod status, pod events, |
use_kubectl fails hereuse_kubectl is a platform-level tool with a hardcoded account allowlist
limited to the global (aws) partition. The cluster bjs-web lives in
account <CN_N_ACCOUNT_ID>, cn-north-1 (aws-cn partition). Token-based EKS
authentication cannot cross partition boundaries.
Do not retry use_kubectl with any account ID. It will never work.
call_kubectlThe aws-cn-2 MCP server exposes a call_kubectl tool alongside call_aws.
Same connection, same endpoint — no additional MCP server needed.
Allowed verbs: get, describe, logs, top, explain,
version, cluster-info, api-resources, api-versions
Write verbs (apply, delete, patch, exec, etc.) are blocked by the
tool itself — output them as a draft command for human approval instead.
| Original intent | Use this instead |
|---|---|
kubectl get pods -n bjs-web -o wide | call_kubectl("kubectl get pods -n bjs-web -o wide") |
kubectl describe pod <pod> -n bjs-web | call_kubectl("kubectl describe pod <pod> -n bjs-web") |
kubectl logs <pod> -n bjs-web --since=1h | call_kubectl("kubectl logs <pod> -n bjs-web --since=1h") |
kubectl get events -n bjs-web --sort-by=.lastTimestamp | call_kubectl("kubectl get events -n bjs-web --sort-by=.lastTimestamp") |
kubectl get deployments -n bjs-web | call_kubectl("kubectl get deployments -n bjs-web") |
For a pod-not-ready alarm on bjs-web:
# 1. Pod overview
call_kubectl("kubectl get pods -n bjs-web -o wide")
# 2. For any non-Running pod, describe it
call_kubectl("kubectl describe pod <pod-name> -n bjs-web")
# 3. Events (sorted by time)
call_kubectl("kubectl get events -n bjs-web --sort-by=.lastTimestamp")
# 4. Deployment status
call_kubectl("kubectl get deployments -n bjs-web")
# 5. Logs if pod is running or was recently running
call_kubectl("kubectl logs <pod-name> -n bjs-web --since=30m")
| What you see in describe/events | Root cause |
|---|---|
ImagePullBackOff / ErrImagePull | Image tag does not exist in ECR — fault L6 |
OOMKilled | Memory limit hit — fault L9 neighbourhood |
CrashLoopBackOff | Container exits — check logs next |
Insufficient cpu / Insufficient memory | Node resource exhausted |
FailedScheduling | No schedulable node |
use_kubectl for China-region EKS. Ever.call_kubectl already
lives inside the existing aws-cn-2 connection.call_aws + CloudWatch as a kubectl substitute — call_kubectl
gives direct Kubernetes API access and is more accurate.call_kubectl — they are blocked. Draft
the remediation command and request human approval via the mitigation skill.