我有一个包含 4 个节点和大约 100 个 pod 的 Kubernetes 集群,kube-apiserver 以标志 --target-ram-mb=512 启动
kube-apiserver 消耗了大约 3GB 的 RAM,并且还在不断增长
(pprof) top
Showing nodes accounting for 1.42GB, 82.29% of 1.73GB total
Dropped 628 nodes (cum <= 0.01GB)
Showing top 10 nodes out of 174
flat flat% sum% cum cum%
1.15GB 66.53% 66.53% 1.15GB 66.53% k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/storage/cacher.newCacheWatcher
0.11GB 6.10% 72.63% 0.11GB 6.10% bufio.NewWriterSize
0.03GB 1.74% 74.37% 0.03GB 1.74% k8s.io/kubernetes/vendor/go.uber.org/zap/zapcore.newCounters
0.03GB 1.47% 75.84% 0.05GB 2.88% runtime.systemstack
0.02GB 1.41% 77.25% 0.02GB 1.41% runtime.malg
0.02GB 1.31% 78.56% 0.02GB 1.31% k8s.io/kubernetes/vendor/github.com/beorn7/perks/quantile.newStream
0.02GB 1.30% 79.86% 0.02GB 1.30% net/http.(*Request).WithContext
0.02GB 0.9% 80.77% 0.06GB 3.46% k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/endpoints/handlers.serveWatch
0.01GB 0.79% 81.56% 0.02GB 1.16% k8s.io/kubernetes/vendor/k8s.io/kube-openapi/pkg/schemaconv.(*convert).VisitKind
0.01GB 0.73% 82.29% 0.01GB 0.73% net/textproto.MIMEHeader.Set
我还可以检查什么?
谢谢
答案1
不幸的是,github 上还有与此相关的错误,但仍然未解决:
https://github.com/kubernetes/kubernetes/pull/85410
似乎您还在 github 上创建了一个与该错误相关的问题。