[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D74S4H8KH0JE50FETMG4VG":3,"skill-same:01M7D74S4H8KH0JE50FETMG4VG":77},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":28,"commitSha":29,"skillDirectory":5,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M7D74S4H8KH0JE50FETMG4VG","gke-observability",null,"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\u002Falert evaluation failures, and monitoring permission errors. Don't use to configure local application logging frameworks or external APMs outside GKE.","tangyixiao\u002Ftangyixiao-skills","tangyixiao","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F115929632?v=4","01M7D582YK6A4M63CAK4CSY4EW","Tang Yixiao","01M7D582Z64DMRSYR872SR34SA",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-observability\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-observability\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: gke-observability\ndescription: Configures GKE observability, including Cloud Logging, Cloud Monitoring,\n  and managed Prometheus. Use when configuring GKE monitoring, setting up GKE logging,\n  or configuring Prometheus metrics collection, to diagnose GKE control plane, API\n  server, admission webhook, etcd storage, node registration or label, and pod eviction,\n  preemption, or scheduling issues using GKE metrics, Kubernetes events, and Cloud\n  Logging, and to troubleshoot Managed Service for Prometheus (GMP) issues such as\n  missing metrics, unhealthy scrape targets, PodMonitoring misconfiguration, rule\u002Falert\n  evaluation failures, and monitoring permission errors. Don't use to configure local\n  application logging frameworks or external APMs outside GKE.\nmetadata:\n  version: 1.2.1\n  category: CloudObservabilityAndMonitoring\n---\n\n# GKE Observability\n\nThis reference covers monitoring, logging, and metrics configuration and\ntroubleshooting for Google Kubernetes Engine (GKE). The golden path enables\ncomprehensive observability including control-plane metrics and Managed Service\nfor Prometheus (GMP).\n\n> **MCP Tools:** `get_cluster`, `list_k8s_events`, `get_k8s_logs`,\n> `get_k8s_cluster_info`, `describe_k8s_resource`. **CLI-only:** `gcloud\n> container clusters update --monitoring=...`, `gcloud logging read`\n\n## Usage Attribution\n\nDo not run live `kubectl`, `gcloud`, or `curl` commands unless the user names a\ntarget cluster\u002Fproject or asks to inspect a live cluster (output commands and\nqueries with placeholders, and skip [Usage Attribution](references\u002Fattribution.md)).\nBefore running any live command, read [Usage Attribution](references\u002Fattribution.md),\nprefix `gcloud` with `CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\u002F1.0 (skill:gke-observability)\"`,\nand append `agent-skills\u002F1.0 (skill:gke-observability)` to `User-Agent` headers\n(never in generated scripts, Terraform, or user-facing code).\n\n## Sub-Skill Reference Routing (Progressive Disclosure)\n\n> **Complete Reference Index** (no `scripts\u002F` directory or unlisted reference\n> files exist — do not run `ls` on the skill folder; read only the matching\n> reference below when answering deep diagnostic, metric, log, or GMP questions):\n\n1.  **[Control-Plane Metrics, Storage, Webhooks & Capacity](references\u002Fcontrol-plane-metrics-and-storage.md)**:\n    Read for GKE control-plane (KCP) VM CPU or RAM\u002Fmemory usage questions (not\n    publicly exposed) and customer-visible alternatives; cluster etcd \u002F\n    etcd-compatible storage left, quota & per-resource scalability limits;\n    admission webhook latency, system namespace\u002FLease\u002Fupgrade exclusions,\n    `APIService` discovery bloat, client discovery caching bursts\n    (`\u002Fapis\u002Fcustom.metrics.k8s.io`, `\u002Fapis\u002Fmetrics.k8s.io`) & proactive GKE\n    Recommender insights; watch storms; controller-manager workqueue & scheduler\n    lag; or control-plane headroom, VM autoscaling & node-count pre-scaling,\n    network egress, connections (`65k`, no per-replica metric) & Protobuf.\n2.  **[Cloud Logging, Audit Attribution, APF & API Server Traces](references\u002Flogging-audit-and-apiserver-traces.md)**:\n    Read for `kube-apiserver` slow-request `Trace[` logs (`trace.go` & KEP-647);\n    `httplog.go` client load (`user_agent`, `verb`, `apf_iseats`); Cloud Audit\n    Log noisy-neighbor, heavy `LIST` & unindexed CRD `fieldSelector` scan\n    tail-latency attribution; API Priority and Fairness (APF) `429`\u002F`504`\u002F`404`\n    throttling; `409 Conflict` hot objects (`ConfigMap` -> `Lease` heartbeats) &\n    `RenewDeadline \u002F 2` leader-election timeouts; `pods\u002Fexec` saturation,\n    Konnectivity (`No agent available`), disabled Cloud KMS keys, or in-cluster\n    GCP IAM OAuth token webhook authorizer saturation.\n3.  **[Cluster\u002FNode\u002FPod Health, Maintenance & Managed Prometheus (GMP)](references\u002Fcluster-node-pod-health-and-gmp.md)**:\n    Read for control-plane availability (`kubernetes.io\u002Fcluster\u002Fkcp_healthchecks`\n    rate ratio & ruling out KCP outages); maintenance windows\n    (`in_maintenance_window`), zonal resize downtime & cluster access errors\n    (`EOF` \u002F `masterAuthorizedNetworksConfig`); node readiness, registration\n    (`AUTO_REPAIR_NODES`, Private Google Access) & persistent node-pool labels;\n    pod startup timelines, crashing pod logs, `tolerationSeconds: 0` mass\n    eviction & Autopilot preemption; or multi-burn-rate SLO alerting\n    (`GlobalRules`) & GMP \u002F Grafana \u002F `PodMonitoring` manifests & troubleshooting.\n\n## Golden Path Observability Defaults\n\nSetting                                             | Golden Path Value                                                                                                                                   | Notes\n--------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -----\n`loggingConfig` components                          | SYSTEM_COMPONENTS, WORKLOADS                                                                                                                        | Full workload logging\n`monitoringConfig` components                       | SYSTEM_COMPONENTS, STORAGE, POD, DEPLOYMENT, STATEFULSET, DAEMONSET, HPA, JOBSET, CADVISOR, KUBELET, DCGM, APISERVER, SCHEDULER, CONTROLLER_MANAGER | Full suite including control-plane\n`managedPrometheusConfig.enabled`                   | `true`                                                                                                                                              | Google-managed Prometheus\n`advancedDatapathObservabilityConfig.enableMetrics` | `true`                                                                                                                                              | Dataplane V2 flow metrics\n`loggingService`                                    | `logging.googleapis.com\u002Fkubernetes`                                                                                                                 | Cloud Logging\n`monitoringService`                                 | `monitoring.googleapis.com\u002Fkubernetes`                                                                                                              | Cloud Monitoring\n\n## Enabling Full Monitoring & Logging\n\nInclude all four caveats whenever providing a `--monitoring` or `--logging`\ncommand so users avoid accidental metric loss, surprise billing, or silent IAM\nfailures:\n\n1.  **Control-plane metrics and logs are NOT enabled by default.** State this\n    outright: `API_SERVER`, `SCHEDULER`, and `CONTROLLER_MANAGER` are off on\n    every new cluster (as are `DCGM`, `CADVISOR`, `KUBELET`, and kube-state\n    `POD`, `DEPLOYMENT`, `STATEFULSET`, `DAEMONSET`, `HPA`, `STORAGE`,\n    `JOBSET`). Only `SYSTEM` is enabled by default. Link to\n    https:\u002F\u002Fdocs.cloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fhow-to\u002Fcontrol-plane-metrics\n    and\n    https:\u002F\u002Fdocs.cloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fhow-to\u002Fview-logs#control_plane_logs.\n2.  **The flag replaces, it does not append.** Passing `--monitoring` or\n    `--logging` overrides the existing component list; pass the full desired\n    list including `SYSTEM`.\n3.  **Control-plane and kube-state metrics bill per sample ingested** via\n    Managed Service for Prometheus (GMP). Mention the cost impact on large\n    clusters; use `--monitoring=SYSTEM` in non-production to reduce cost.\n4.  **Verify APIs and IAM permissions (`PermissionDenied`).** Check `gcloud\n    container clusters describe {cluster_name} --region {region}\n    --format=\"yaml(loggingConfig,monitoringConfig)\"`, ensure\n    `logging.googleapis.com` and `monitoring.googleapis.com` are enabled, and\n    verify the node service account \u002F GKE service agent has\n    `roles\u002Fmonitoring.metricWriter` and\n    `roles\u002Fcontainer.defaultNodeServiceAgent`.\n\n> **CLI flag vs. API enum spelling (mixing them fails the command):**\n>\n> Component      | `gcloud --monitoring=` | `monitoringConfig` API enum\n> -------------- | ---------------------- | ---------------------------\n> System         | `SYSTEM`               | `SYSTEM_COMPONENTS`\n> API server     | `API_SERVER`           | `APISERVER`\n> Controller mgr | `CONTROLLER_MANAGER`   | `CONTROLLER_MANAGER`\n\n```bash\n# Enable golden path monitoring and control-plane logging suite\ngcloud container clusters update {cluster_name} --region {region} \\\n  --monitoring=SYSTEM,API_SERVER,SCHEDULER,CONTROLLER_MANAGER,STORAGE,POD,DEPLOYMENT,STATEFULSET,DAEMONSET,HPA,JOBSET,CADVISOR,KUBELET,DCGM \\\n  --logging=SYSTEM,WORKLOAD,API_SERVER,SCHEDULER,CONTROLLER_MANAGER \\\n  --quiet\n\n# Enable Managed Prometheus and Dataplane V2 flow\u002Fpolicy observability\ngcloud container clusters update {cluster_name} --region {region} \\\n  --enable-managed-prometheus \\\n  --enable-dataplane-v2-flow-observability \\\n  --quiet\n```\n\n## Core GKE Metrics & Alerting Baseline\n\nExplicitly name **Google Cloud Monitoring** when proposing dashboards and\nalerts, and cover cluster\u002Fnode CPU and memory capacity, pod restarts\n(`CrashLoopBackOff`), volume space exhaustion, and API server latency\n(`apiserver_request_duration_seconds`). Direct control-plane VM CPU\u002FRAM metrics\nare not publicly exposed — read\n[Control-Plane Metrics, Storage, Webhooks & Capacity](references\u002Fcontrol-plane-metrics-and-storage.md)\nwhenever asked about control-plane VM CPU\u002Fmemory or deep control-plane metrics.\n\nMetric                                           | Source             | Use \u002F Alert Threshold\n------------------------------------------------ | ------------------ | ---------------------\n`apiserver_request_duration_seconds`             | API Server (GMP)   | Control-plane latency (Alert: P99 > 5s)\n`scheduler_scheduling_attempt_duration_seconds`  | Scheduler (GMP)    | Current GKE scheduling latency (`scheduler_schedule_attempts_total{result=\"error\"} > 0`)\n`container_cpu_usage_seconds_total`              | cAdvisor (Node)    | Worker-node container CPU usage\n`container_memory_working_set_bytes`             | cAdvisor (Node)    | Worker-node container memory usage\n`kubernetes.io\u002Fnode\u002Fcpu\u002Fcore_usage_time`         | Cloud Monitoring   | Node CPU usage (`kubernetes.io\u002Fnode\u002Fmemory\u002Fused_bytes` for memory)\n`kube_pod_status_phase`                          | kube-state-metrics | Pod lifecycle phase (requires deploying GMP or self-managed kube-state-metrics)\n`kube_pod_container_status_restarts_total`       | kube-state-metrics | Pod crash loops (Alert: > 5 in 10m; requires kube-state-metrics)\n`kube_node_status_condition`                     | kube-state-metrics | Node readiness (`condition=\"Ready\", status!=\"True\"`; or `kubernetes.io\u002Fnode\u002Fstatus_condition`)\n`kubelet_volume_stats_used_bytes \u002F capacity`     | Kubelet            | PVC capacity utilization (Alert: > 85%)\n`DCGM_FI_DEV_GPU_UTIL`                           | DCGM (GMP)         | GPU utilization (Alert: > 95% sustained)\n\n## Live Resource Usage & Cloud Logging Queries\n\nUse `kubectl top` for live usage (no MCP or `gcloud` equivalent):\n\n```bash\nkubectl top pods --all-namespaces --sort-by=cpu\nkubectl top nodes\nkubectl top pods --containers -n {namespace}\n```\n\nUse `gcloud logging read` (or Cloud Logging Log Explorer) with LQL filters:\n\n```bash\n# Control-plane component logs (requires API_SERVER \u002F SCHEDULER \u002F CONTROLLER_MANAGER enabled)\ngcloud logging read 'resource.type=\"k8s_control_plane_component\" AND resource.labels.cluster_name=\"{cluster_name}\"' --project {project_id} --limit 50 --quiet\n\n# Container errors: resource.type=\"k8s_container\" AND resource.labels.container_name=\"{container_name}\" AND severity>=ERROR\n# OOMKilled events: resource.type=\"k8s_event\" AND jsonPayload.reason=\"OOMKilling\"\n# FailedScheduling: resource.type=\"k8s_event\" AND jsonPayload.reason=\"FailedScheduling\"\n# Cloud Audit Logs: resource.type=\"k8s_cluster\" AND logName:\"cloudaudit.googleapis.com\"\n# Dataplane V2 network policy \u002F packet drop logs: logName:\"policy_action\" AND jsonPayload.disposition=\"DENY\"\n```\n\n## Distributed Tracing, Profiling & Recent Additions\n\n-   **Cloud Trace & OpenTelemetry**: Deploy the OpenTelemetry Collector\n    (`googlecloud` exporter with Workload Identity) or enable **Managed\n    OpenTelemetry for GKE (Preview)** on GKE 1.34.1-gke.2178000+ (`gcloud beta\n    container clusters update {cluster_name} --region {region}\n    --managed-otel-scope=COLLECTION_AND_INSTRUMENTATION_COMPONENTS`).\n-   **Cloud Profiler**: Continuous low-overhead production CPU\u002Fmemory profiling.\n-   **PSI (Pressure Stall Information) metrics**: cAdvisor\n    `container_pressure_{cpu,memory,io}_{waiting,stalled}_seconds_total` via GMP\n    `ClusterNodeMonitoring` (GKE 1.35+).\n\n## Supporting Links\n\n-   [GKE System Metrics](https:\u002F\u002Fdocs.cloud.google.com\u002Fmonitoring\u002Fapi\u002Fmetrics_kubernetes)\n-   [GKE Control-Plane Metrics](https:\u002F\u002Fdocs.cloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fhow-to\u002Fcontrol-plane-metrics)\n-   [GKE Control-Plane Logs](https:\u002F\u002Fdocs.cloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fhow-to\u002Fview-logs#control_plane_logs)\n-   [Google Cloud Managed Service for Prometheus](https:\u002F\u002Fcloud.google.com\u002Fstackdriver\u002Fdocs\u002Fmanaged-prometheus)\n-   [Troubleshoot Managed Service for Prometheus](https:\u002F\u002Fdocs.cloud.google.com\u002Fstackdriver\u002Fdocs\u002Fmanaged-prometheus\u002Ftroubleshooting.md.txt)\n-   [Rule Evaluation (Rules \u002F ClusterRules \u002F GlobalRules)](https:\u002F\u002Fdocs.cloud.google.com\u002Fstackdriver\u002Fdocs\u002Fmanaged-prometheus\u002Frules-managed.md.txt)\n-   [Cloud Logging Query Language (LQL)](https:\u002F\u002Fcloud.google.com\u002Flogging\u002Fdocs\u002Fview\u002Flogging-query-language)\n-   [Google Cloud Monitoring Alerts](https:\u002F\u002Fcloud.google.com\u002Fmonitoring\u002Falerts)\n","# GKE Observability\n\nThis reference covers monitoring, logging, and metrics configuration and\ntroubleshooting for Google Kubernetes Engine (GKE). The golden path enables\ncomprehensive observability including control-plane metrics and Managed Service\nfor Prometheus (GMP).\n\n> **MCP Tools:** `get_cluster`, `list_k8s_events`, `get_k8s_logs`,\n> `get_k8s_cluster_info`, `describe_k8s_resource`. **CLI-only:** `gcloud\n> container clusters update --monitoring=...`, `gcloud logging read`\n\n## Usage Attribution\n\nDo not run live `kubectl`, `gcloud`, or `curl` commands unless the user names a\ntarget cluster\u002Fproject or asks to inspect a live cluster (output commands and\nqueries with placeholders, and skip [Usage Attribution](references\u002Fattribution.md)).\nBefore running any live command, read [Usage Attribution](references\u002Fattribution.md),\nprefix `gcloud` with `CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\u002F1.0 (skill:gke-observability)\"`,\nand append `agent-skills\u002F1.0 (skill:gke-observability)` to `User-Agent` headers\n(never in generated scripts, Terraform, or user-facing code).\n\n## Sub-Skill Reference Routing (Progressive Disclosure)\n\n> **Complete Reference Index** (no `scripts\u002F` directory or unlisted reference\n> files exist — do not run `ls` on the skill folder; read only the matching\n> reference below when answering deep diagnostic, metric, log, or GMP questions):\n\n1.  **[Control-Plane Metrics, Storage, Webhooks & Capacity](references\u002Fcontrol-plane-metrics-and-storage.md)**:\n    Read for GKE control-plane (KCP) VM CPU or RAM\u002Fmemory usage questions (not\n    publicly exposed) and customer-visible alternatives; cluster etcd \u002F\n    etcd-compatible storage left, quota & per-resource scalability limits;\n    admission webhook latency, system namespace\u002FLease\u002Fupgrade exclusions,\n    `APIService` discovery bloat, client discovery caching bursts\n    (`\u002Fapis\u002Fcustom.metrics.k8s.io`, `\u002Fapis\u002Fmetrics.k8s.io`) & proactive GKE\n    Recommender insights; watch storms; controller-manager workqueue & scheduler\n    lag; or control-plane headroom, VM autoscaling & node-count pre-scaling,\n    network egress, connections (`65k`, no per-replica metric) & Protobuf.\n2.  **[Cloud Logging, Audit Attribution, APF & API Server Traces](references\u002Flogging-audit-and-apiserver-traces.md)**:\n    Read for `kube-apiserver` slow-request `Trace[` logs (`trace.go` & KEP-647);\n    `httplog.go` client load (`user_agent`, `verb`, `apf_iseats`); Cloud Audit\n    Log noisy-neighbor, heavy `LIST` & unindexed CRD `fieldSelector` scan\n    tail-latency attribution; API Priority and Fairness (APF) `429`\u002F`504`\u002F`404`\n    throttling; `409 Conflict` hot objects (`ConfigMap` -> `Lease` heartbeats) &\n    `RenewDeadline \u002F 2` leader-election timeouts; `pods\u002Fexec` saturation,\n    Konnectivity (`No agent available`), disabled Cloud KMS keys, or in-cluster\n    GCP IAM OAuth token webhook authorizer saturation.\n3.  **[Cluster\u002FNode\u002FPod Health, Maintenance & Managed Prometheus (GMP)](references\u002Fcluster-node-pod-health-and-gmp.md)**:\n    Read for control-plane availability (`kubernetes.io\u002Fcluster\u002Fkcp_healthchecks`\n    rate ratio & ruling out KCP outages); maintenance windows\n    (`in_maintenance_window`), zonal resize downtime & cluster access errors\n    (`EOF` \u002F `masterAuthorizedNetworksConfig`); node readiness, registration\n    (`AUTO_REPAIR_NODES`, Private Google Access) & persistent node-pool labels;\n    pod startup timelines, crashing pod logs, `tolerationSeconds: 0` mass\n    eviction & Autopilot preemption; or multi-burn-rate SLO alerting\n    (`GlobalRules`) & GMP \u002F Grafana \u002F `PodMonitoring` manifests & troubleshooting.\n\n## Golden Path Observability Defaults\n\nSetting                                             | Golden Path Value                                                                                                                                   | Notes\n--------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -----\n`loggingConfig` components                          | SYSTEM_COMPONENTS, WORKLOADS                                                                                                                        | Full workload logging\n`monitoringConfig` components                       | SYSTEM_COMPONENTS, STORAGE, POD, DEPLOYMENT, STATEFULSET, DAEMONSET, HPA, JOBSET, CADVISOR, KUBELET, DCGM, APISERVER, SCHEDULER, CONTROLLER_MANAGER | Full suite including control-plane\n`managedPrometheusConfig.enabled`                   | `true`                                                                                                                                              | Google-managed Prometheus\n`advancedDatapathObservabilityConfig.enableMetrics` | `true`                                                                                                                                              | Dataplane V2 flow metrics\n`loggingService`                                    | `logging.googleapis.com\u002Fkubernetes`                                                                                                                 | Cloud Logging\n`monitoringService`                                 | `monitoring.googleapis.com\u002Fkubernetes`                                                                                                              | Cloud Monitoring\n\n## Enabling Full Monitoring & Logging\n\nInclude all four caveats whenever providing a `--monitoring` or `--logging`\ncommand so users avoid accidental metric loss, surprise billing, or silent IAM\nfailures:\n\n1.  **Control-plane metrics and logs are NOT enabled by default.** State this\n    outright: `API_SERVER`, `SCHEDULER`, and `CONTROLLER_MANAGER` are off on\n    every new cluster (as are `DCGM`, `CADVISOR`, `KUBELET`, and kube-state\n    `POD`, `DEPLOYMENT`, `STATEFULSET`, `DAEMONSET`, `HPA`, `STORAGE`,\n    `JOBSET`). Only `SYSTEM` is enabled by default. Link to\n    https:\u002F\u002Fdocs.cloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fhow-to\u002Fcontrol-plane-metrics\n    and\n    https:\u002F\u002Fdocs.cloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fhow-to\u002Fview-logs#control_plane_logs.\n2.  **The flag replaces, it does not append.** Passing `--monitoring` or\n    `--logging` overrides the existing component list; pass the full desired\n    list including `SYSTEM`.\n3.  **Control-plane and kube-state metrics bill per sample ingested** via\n    Managed Service for Prometheus (GMP). Mention the cost impact on large\n    clusters; use `--monitoring=SYSTEM` in non-production to reduce cost.\n4.  **Verify APIs and IAM permissions (`PermissionDenied`).** Check `gcloud\n    container clusters describe {cluster_name} --region {region}\n    --format=\"yaml(loggingConfig,monitoringConfig)\"`, ensure\n    `logging.googleapis.com` and `monitoring.googleapis.com` are enabled, and\n    verify the node service account \u002F GKE service agent has\n    `roles\u002Fmonitoring.metricWriter` and\n    `roles\u002Fcontainer.defaultNodeServiceAgent`.\n\n> **CLI flag vs. API enum spelling (mixing them fails the command):**\n>\n> Component      | `gcloud --monitoring=` | `monitoringConfig` API enum\n> -------------- | ---------------------- | ---------------------------\n> System         | `SYSTEM`               | `SYSTEM_COMPONENTS`\n> API server     | `API_SERVER`           | `APISERVER`\n> Controller mgr | `CONTROLLER_MANAGER`   | `CONTROLLER_MANAGER`\n\n```bash\n# Enable golden path monitoring and control-plane logging suite\ngcloud container clusters update {cluster_name} --region {region} \\\n  --monitoring=SYSTEM,API_SERVER,SCHEDULER,CONTROLLER_MANAGER,STORAGE,POD,DEPLOYMENT,STATEFULSET,DAEMONSET,HPA,JOBSET,CADVISOR,KUBELET,DCGM \\\n  --logging=SYSTEM,WORKLOAD,API_SERVER,SCHEDULER,CONTROLLER_MANAGER \\\n  --quiet\n\n# Enable Managed Prometheus and Dataplane V2 flow\u002Fpolicy observability\ngcloud container clusters update {cluster_name} --region {region} \\\n  --enable-managed-prometheus \\\n  --enable-dataplane-v2-flow-observability \\\n  --quiet\n```\n\n## Core GKE Metrics & Alerting Baseline\n\nExplicitly name **Google Cloud Monitoring** when proposing dashboards and\nalerts, and cover cluster\u002Fnode CPU and memory capacity, pod restarts\n(`CrashLoopBackOff`), volume space exhaustion, and API server latency\n(`apiserver_request_duration_seconds`). Direct control-plane VM CPU\u002FRAM metrics\nare not publicly exposed — read\n[Control-Plane Metrics, Storage, Webhooks & Capacity](references\u002Fcontrol-plane-metrics-and-storage.md)\nwhenever asked about control-plane VM CPU\u002Fmemory or deep control-plane metrics.\n\nMetric                                           | Source             | Use \u002F Alert Threshold\n------------------------------------------------ | ------------------ | ---------------------\n`apiserver_request_duration_seconds`             | API Server (GMP)   | Control-plane latency (Alert: P99 > 5s)\n`scheduler_scheduling_attempt_duration_seconds`  | Scheduler (GMP)    | Current GKE scheduling latency (`scheduler_schedule_attempts_total{result=\"error\"} > 0`)\n`container_cpu_usage_seconds_total`              | cAdvisor (Node)    | Worker-node container CPU usage\n`container_memory_working_set_bytes`             | cAdvisor (Node)    | Worker-node container memory usage\n`kubernetes.io\u002Fnode\u002Fcpu\u002Fcore_usage_time`         | Cloud Monitoring   | Node CPU usage (`kubernetes.io\u002Fnode\u002Fmemory\u002Fused_bytes` for memory)\n`kube_pod_status_phase`                          | kube-state-metrics | Pod lifecycle phase (requires deploying GMP or self-managed kube-state-metrics)\n`kube_pod_container_status_restarts_total`       | kube-state-metrics | Pod crash loops (Alert: > 5 in 10m; requires kube-state-metrics)\n`kube_node_status_condition`                     | kube-state-metrics | Node readiness (`condition=\"Ready\", status!=\"True\"`; or `kubernetes.io\u002Fnode\u002Fstatus_condition`)\n`kubelet_volume_stats_used_bytes \u002F capacity`     | Kubelet            | PVC capacity utilization (Alert: > 85%)\n`DCGM_FI_DEV_GPU_UTIL`                           | DCGM (GMP)         | GPU utilization (Alert: > 95% sustained)\n\n## Live Resource Usage & Cloud Logging Queries\n\nUse `kubectl top` for live usage (no MCP or `gcloud` equivalent):\n\n```bash\nkubectl top pods --all-namespaces --sort-by=cpu\nkubectl top nodes\nkubectl top pods --containers -n {namespace}\n```\n\nUse `gcloud logging read` (or Cloud Logging Log Explorer) with LQL filters:\n\n```bash\n# Control-plane component logs (requires API_SERVER \u002F SCHEDULER \u002F CONTROLLER_MANAGER enabled)\ngcloud logging read 'resource.type=\"k8s_control_plane_component\" AND resource.labels.cluster_name=\"{cluster_name}\"' --project {project_id} --limit 50 --quiet\n\n# Container errors: resource.type=\"k8s_container\" AND resource.labels.container_name=\"{container_name}\" AND severity>=ERROR\n# OOMKilled events: resource.type=\"k8s_event\" AND jsonPayload.reason=\"OOMKilling\"\n# FailedScheduling: resource.type=\"k8s_event\" AND jsonPayload.reason=\"FailedScheduling\"\n# Cloud Audit Logs: resource.type=\"k8s_cluster\" AND logName:\"cloudaudit.googleapis.com\"\n# Dataplane V2 network policy \u002F packet drop logs: logName:\"policy_action\" AND jsonPayload.disposition=\"DENY\"\n```\n\n## Distributed Tracing, Profiling & Recent Additions\n\n-   **Cloud Trace & OpenTelemetry**: Deploy the OpenTelemetry Collector\n    (`googlecloud` exporter with Workload Identity) or enable **Managed\n    OpenTelemetry for GKE (Preview)** on GKE 1.34.1-gke.2178000+ (`gcloud beta\n    container clusters update {cluster_name} --region {region}\n    --managed-otel-scope=COLLECTION_AND_INSTRUMENTATION_COMPONENTS`).\n-   **Cloud Profiler**: Continuous low-overhead production CPU\u002Fmemory profiling.\n-   **PSI (Pressure Stall Information) metrics**: cAdvisor\n    `container_pressure_{cpu,memory,io}_{waiting,stalled}_seconds_total` via GMP\n    `ClusterNodeMonitoring` (GKE 1.35+).\n\n## Supporting Links\n\n-   [GKE System Metrics](https:\u002F\u002Fdocs.cloud.google.com\u002Fmonitoring\u002Fapi\u002Fmetrics_kubernetes)\n-   [GKE Control-Plane Metrics](https:\u002F\u002Fdocs.cloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fhow-to\u002Fcontrol-plane-metrics)\n-   [GKE Control-Plane Logs](https:\u002F\u002Fdocs.cloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fhow-to\u002Fview-logs#control_plane_logs)\n-   [Google Cloud Managed Service for Prometheus](https:\u002F\u002Fcloud.google.com\u002Fstackdriver\u002Fdocs\u002Fmanaged-prometheus)\n-   [Troubleshoot Managed Service for Prometheus](https:\u002F\u002Fdocs.cloud.google.com\u002Fstackdriver\u002Fdocs\u002Fmanaged-prometheus\u002Ftroubleshooting.md.txt)\n-   [Rule Evaluation (Rules \u002F ClusterRules \u002F GlobalRules)](https:\u002F\u002Fdocs.cloud.google.com\u002Fstackdriver\u002Fdocs\u002Fmanaged-prometheus\u002Frules-managed.md.txt)\n-   [Cloud Logging Query Language (LQL)](https:\u002F\u002Fcloud.google.com\u002Flogging\u002Fdocs\u002Fview\u002Flogging-query-language)\n-   [Google Cloud Monitoring Alerts](https:\u002F\u002Fcloud.google.com\u002Fmonitoring\u002Falerts)\n",{"name":5,"metadata":25,"description":7},{"version":26,"category":27},"1.2.1","CloudObservabilityAndMonitoring","main","2a870f189175a48c39f5f7e26a6d93b0be9cd13b",0,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills","https:\u002F\u002Ftangyixiao.github.io\u002Ftangyixiao-skills\u002F","https:\u002F\u002Fgithub.com\u002Ftangyixiao","http:\u002F\u002Fwww.sxyz.net\u002F","I am Tang Yixiao, a student in Shaoxing No.1 High School. I am eager to learn on GitHub and contribute my part to this community.","2026-11-11 15:45:59",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add tangyixiao\u002Ftangyixiao-skills --skill gke-observability",{"tool":43,"command":44},"bunx","bunx skills add tangyixiao\u002Ftangyixiao-skills --skill gke-observability",{"tool":46,"command":47},"pnpm","pnpm dlx skills add tangyixiao\u002Ftangyixiao-skills --skill gke-observability","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-observability\u002FSKILL.md",true,[51,57,61,65,69,73],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"INSTALL-SOURCE.json","REFERENCE","参考文档",511,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-observability\u002FINSTALL-SOURCE.json",{"path":58,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":16},"LICENSE","许可证",11358,{"path":62,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fattribution.md",1891,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-observability\u002Freferences\u002Fattribution.md",{"path":66,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fcluster-node-pod-health-and-gmp.md",13258,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-observability\u002Freferences\u002Fcluster-node-pod-health-and-gmp.md",{"path":70,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fcontrol-plane-metrics-and-storage.md",14534,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-observability\u002Freferences\u002Fcontrol-plane-metrics-and-storage.md",{"path":74,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Flogging-audit-and-apiserver-traces.md",14126,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-observability\u002Freferences\u002Flogging-audit-and-apiserver-traces.md",[78,86,95,103,111,119],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":82,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":20},"01M7D8JK8FYBFNNAJXWD89CFH7","xlsx","Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \"the xlsx in my downloads\") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fxlsx\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fxlsx\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":90,"licenseFileUrl":91,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":20},"01M7D8JG8ERGGQQAMX0DWCG9GR","writing-shape","Writing, exploit: shape raw material into an article, paragraph by paragraph.","MIT","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-shape\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-shape\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":90,"licenseFileUrl":99,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":20},"01M7D8JE672GW3EHSE8EF185M4","writing-fragments","Writing, explore: mine raw fragments, no structure yet.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-fragments\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-fragments\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":90,"licenseFileUrl":107,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":20},"01M7D8JBK572YDFMND8Q6CEYJW","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-for-agents\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":90,"licenseFileUrl":115,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":20},"01M7D8J5QPWEXX61EGBKYH73R8","writing-clearly-and-concisely","Use when writing prose humans will read—documentation, commit messages, error messages, explanations, reports, or UI text. Applies Strunk's timeless rules for clearer, stronger, more professional writing.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-clearly-and-concisely\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-clearly-and-concisely\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":90,"licenseFileUrl":123,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":20},"01M7D8J36YWC8WZS5DK5AH03CD","writing-beats","Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-beats\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-beats\u002FSKILL.md",[],[]]