gke-observability
它能做什么
这项技能帮助 AI 智能体为 GKE 配置 Cloud Logging、Cloud Monitoring 和托管 Prometheus。适合希望了解集群运行状况的团队。
适用场景
- ✓当你想设置 GKE 监控、日志或 Prometheus 指标时。
- ✓当 Pod 无法调度或被驱逐,你需要找出原因时。
- ✓当你想检查 GKE 中控制平面、API 服务器或节点注册问题时。
技能链接
https://github.com/google/skills/blob/main/skills/cloud/gke-observability/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“如何为我的 GKE 集群开启 Prometheus 指标和日志,以便查看运行情况?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会读取 GKE 指标、Kubernetes 事件和日志,并为每类问题指向相应的参考资料。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
GKE Observability
This reference covers monitoring, logging, and metrics configuration and troubleshooting for Google Kubernetes Engine (GKE). The golden path enables comprehensive observability including control-plane metrics and Managed Service for Prometheus (GMP).
MCP Tools:
get_cluster,list_k8s_events,get_k8s_logs,get_k8s_cluster_info,describe_k8s_resource. CLI-only:gcloud container clusters update --monitoring=...,gcloud logging read
Usage Attribution
Do not run live kubectl, gcloud, or curl commands unless the user names a
target cluster/project or asks to inspect a live cluster (output commands and
queries with placeholders, and skip Usage Attribution).
Before running any live command, read Usage Attribution,
prefix gcloud with CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gke-observability)",
and append agent-skills/1.0 (skill:gke-observability) to User-Agent headers
(never in generated scripts, Terraform, or user-facing code).
Sub-Skill Reference Routing (Progressive Disclosure)
Complete Reference Index (no
scripts/directory or unlisted reference files exist — do not runlson the skill folder; read only the matching reference below when answering deep diagnostic, metric, log, or GMP questions):
- Control-Plane Metrics, Storage, Webhooks & Capacity:
Read for GKE control-plane (KCP) VM CPU or RAM/memory usage questions (not
publicly exposed) and customer-visible alternatives; cluster etcd /
etcd-compatible storage left, quota & per-resource scalability limits;
admission webhook latency, system namespace/Lease/upgrade exclusions,
APIServicediscovery bloat & proactive GKE Recommender insights; watch storms; controller-manager workqueue & scheduler lag; or control-plane headroom, VM autoscaling & node-count pre-scaling, per-replica egress (200 MB/s), connections (65k, no per-replica metric) & Protobuf. - Cloud Logging, Audit Attribution, APF & API Server Traces:
Read for
kube-apiserverslow-requestTrace[logs (trace.go& KEP-647);httplog.goclient load (user_agent,verb,apf_iseats); Cloud Audit Log noisy-neighbor & heavyLISTattribution; API Priority and Fairness (APF)429/504/404throttling;409 Conflicthot objects &RenewDeadline / 2leader-election timeouts;pods/execsaturation, Konnectivity (No agent available), disabled Cloud KMS keys, or in-cluster GCP IAM OAuth token webhook authorizer saturation. - Cluster/Node/Pod Health, Maintenance & Managed Prometheus (GMP):
Read for control-plane availability (
kubernetes.io/cluster/kcp_healthchecksrate ratio & ruling out KCP outages); maintenance windows (in_maintenance_window), zonal resize downtime & cluster access errors (EOF/masterAuthorizedNetworksConfig); node readiness, registration (AUTO_REPAIR_NODES, Private Google Access) & persistent node-pool labels; pod startup timelines, crashing pod logs,tolerationSeconds: 0mass eviction & Autopilot preemption; or multi-burn-rate SLO alerting (GlobalRules) & GMP / Grafana /PodMonitoringmanifests & troubleshooting.
Golden Path Observability Defaults
| Setting | Golden Path Value | Notes |
|---|---|---|
loggingConfig components |
SYSTEM_COMPONENTS, WORKLOADS | Full workload logging |
monitoringConfig components |
SYSTEM_COMPONENTS, STORAGE, POD, DEPLOYMENT, STATEFULSET, DAEMONSET, HPA, JOBSET, CADVISOR, KUBELET, DCGM, APISERVER, SCHEDULER, CONTROLLER_MANAGER | Full suite including control-plane |
managedPrometheusConfig.enabled |
true |
常见问题
可观测性涵盖哪些部分?
它涵盖 Cloud Logging、Cloud Monitoring 和托管 Prometheus。
它默认会在我的集群上运行实时命令吗?
不会。只有当你指定目标集群或项目,或要求它检查时,才会运行实时命令。
它能检查哪些类型的问题?
它能检查控制平面、准入 webhook、etcd 存储、节点标签,以及 Pod 驱逐或调度问题。
详情
作者的原始描述
Configures GKE observability, including Cloud Logging, Cloud Monitoring, and managed Prometheus. Use when configuring GKE monitoring, setting up GKE logging, or configuring Prometheus metrics collection, to diagnose GKE control plane, API server, admission webhook, etcd storage, node registration or label, and pod eviction, preemption, or scheduling issues using GKE metrics, Kubernetes events, and Cloud Logging, and to troubleshoot Managed Service for Prometheus (GMP) issues such as missing metrics, unhealthy scrape targets, PodMonitoring misconfiguration, rule/alert evaluation failures, and m
repo: google/skills
热度
- GitHub 星标
- 22k
- 排名
- #10293
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
finding-google-skills
22k帮你的智能体为某项设置任务找到合适的 Google 指南,例如托管、数据库、存储、登录或 AI 模型服务。
gcloud
22k帮你的智能体编写并检查 Google Cloud gcloud 命令,在运行任何内容之前查阅准确的语法,避免猜测参数。
google-cloud-recipe-auth
22k引导你的智能体了解 Google Cloud 的身份与访问管理,包括人员和服务如何登录,以及它们各自获得哪些权限。
google-cloud-recipe-onboarding
22k带领新开发者完成在 Google Cloud 上的第一步,包括选择项目、关联计费,以及部署第一个资源。