新的 GKE 集群记录了数千个错误
New GKE cluster logging thousands of errors
在 Google Kubernetes Engine 中创建一个全新的 Kubernetes 集群后,我在 Google 与指标代理相关的云日志记录中看到很多错误。
我在版本 1.18.x
上的现有集群上遇到过这个问题。然后我在后升级到1.19.x
。然而,问题依然存在,所以我升级到 1.20.x
仍然没有任何变化。
最终我使用最新的 Kubernetes 版本创建了一个新集群,但仍然看到在之后立即记录了数百个错误:
gcloud beta container clusters create "my-cluster-1" \
--project "my-project-1" \
--zone "europe-west2-a" \
--no-enable-basic-auth \
--release-channel "rapid" \
--cluster-version "1.20.2-gke.2500" \
--machine-type "e2-standard-2" \
--image-type "COS_CONTAINERD" \
--disk-type "pd-standard" \
--disk-size "100" \
--metadata disable-legacy-endpoints=true \
--scopes "https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly","https://www.googleapis.com/auth/trace.append" \
--num-nodes "1" \
--enable-stackdriver-kubernetes \
--enable-private-nodes \
--master-ipv4-cidr "172.16.0.0/28" \
--enable-ip-alias \
--network "projects/my-project-1/global/networks/default" \
--subnetwork "projects/my-project-1/regions/europe-west2/subnetworks/default" \
--default-max-pods-per-node "110" \
--no-enable-master-authorized-networks \
--addons HorizontalPodAutoscaling,HttpLoadBalancing,NodeLocalDNS,GcePersistentDiskCsiDriver \
--enable-autoupgrade \
--enable-autorepair \
--max-surge-upgrade 1 \
--max-unavailable-upgrade 0 \
--workload-pool "my-project-1.svc.id.goog" \
--enable-shielded-nodes \
--node-locations "europe-west2-a","europe-west2-b","europe-west2-c"
在 Google 云日志记录中,我使用以下查询检查错误:
severity=ERROR
AND (resource.labels.container_name:"gke-metrics-agent"
OR resource.labels.container_name="metrics-server-nanny")
resource.labels.cluster_name="my-cluster-1"
根据另一个建议,我等待了 10 多分钟,但仍然收到相同数量的错误记录:
2021 年 3 月 5 日更新
正在通过 UI 创建一个新的测试集群。除了集群名称设置为 test-cluster-1
和 Zone 设置为 europe-west-2a
以及 Kubernetes 版本根据建议设置为最新的快速通道之外,不做任何更改:
创建新集群后,我立即收到数百个错误记录:
我会观察 15-20 分钟,看看它是否仍然如此。
如 中所述,GKE cluster
v 1.18.12-gke.1206
包含记录了数百个 Prometheus
错误的错误:
github.com/prometheus/prometheus/scrape.(*scrapeLoop).scrapeAndReport
此问题已通过 Issue Tracker
报告。此问题已在版本 1.18.14-gke.1200+
和 1.19.6-gke.600+
中修复。
具有上述版本或更高版本的新集群包含针对此问题的修复程序。
OP 的集群配置包含一个标志,导致此问题再次发生。我已经测试了一些场景,但 OP @dustinmoris 发现它是由 NodeLocalDNS
插件引起的。
启用一个插件:NodeLocalDNS
问题再次发生。它在以下版本上进行了测试:1.20.2-gke.2500
、1.19.7-gke.1500
、1.19.7-gke.2503
、1.18.15-gke.1102
.
适当的评论已经添加到 Issue Tracker
。对于所有更新,请检查 this Issue Tracker.
在 Google Kubernetes Engine 中创建一个全新的 Kubernetes 集群后,我在 Google 与指标代理相关的云日志记录中看到很多错误。
我在版本 1.18.x
上的现有集群上遇到过这个问题。然后我在1.19.x
。然而,问题依然存在,所以我升级到 1.20.x
仍然没有任何变化。
最终我使用最新的 Kubernetes 版本创建了一个新集群,但仍然看到在之后立即记录了数百个错误:
gcloud beta container clusters create "my-cluster-1" \
--project "my-project-1" \
--zone "europe-west2-a" \
--no-enable-basic-auth \
--release-channel "rapid" \
--cluster-version "1.20.2-gke.2500" \
--machine-type "e2-standard-2" \
--image-type "COS_CONTAINERD" \
--disk-type "pd-standard" \
--disk-size "100" \
--metadata disable-legacy-endpoints=true \
--scopes "https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly","https://www.googleapis.com/auth/trace.append" \
--num-nodes "1" \
--enable-stackdriver-kubernetes \
--enable-private-nodes \
--master-ipv4-cidr "172.16.0.0/28" \
--enable-ip-alias \
--network "projects/my-project-1/global/networks/default" \
--subnetwork "projects/my-project-1/regions/europe-west2/subnetworks/default" \
--default-max-pods-per-node "110" \
--no-enable-master-authorized-networks \
--addons HorizontalPodAutoscaling,HttpLoadBalancing,NodeLocalDNS,GcePersistentDiskCsiDriver \
--enable-autoupgrade \
--enable-autorepair \
--max-surge-upgrade 1 \
--max-unavailable-upgrade 0 \
--workload-pool "my-project-1.svc.id.goog" \
--enable-shielded-nodes \
--node-locations "europe-west2-a","europe-west2-b","europe-west2-c"
在 Google 云日志记录中,我使用以下查询检查错误:
severity=ERROR
AND (resource.labels.container_name:"gke-metrics-agent"
OR resource.labels.container_name="metrics-server-nanny")
resource.labels.cluster_name="my-cluster-1"
根据另一个建议,我等待了 10 多分钟,但仍然收到相同数量的错误记录:
2021 年 3 月 5 日更新
正在通过 UI 创建一个新的测试集群。除了集群名称设置为 test-cluster-1
和 Zone 设置为 europe-west-2a
以及 Kubernetes 版本根据建议设置为最新的快速通道之外,不做任何更改:
创建新集群后,我立即收到数百个错误记录:
我会观察 15-20 分钟,看看它是否仍然如此。
如 GKE cluster
v 1.18.12-gke.1206
包含记录了数百个 Prometheus
错误的错误:
github.com/prometheus/prometheus/scrape.(*scrapeLoop).scrapeAndReport
此问题已通过 Issue Tracker
报告。此问题已在版本 1.18.14-gke.1200+
和 1.19.6-gke.600+
中修复。
具有上述版本或更高版本的新集群包含针对此问题的修复程序。
OP 的集群配置包含一个标志,导致此问题再次发生。我已经测试了一些场景,但 OP @dustinmoris 发现它是由 NodeLocalDNS
插件引起的。
启用一个插件:NodeLocalDNS
问题再次发生。它在以下版本上进行了测试:1.20.2-gke.2500
、1.19.7-gke.1500
、1.19.7-gke.2503
、1.18.15-gke.1102
.
适当的评论已经添加到 Issue Tracker
。对于所有更新,请检查 this Issue Tracker.