无法检索 Heapster Metric 模型
Unable to retrieve Heapster Metric model
我是 运行 我在 GKE 上的 kubernetes v1.6.11-gke.0 集群。
在集群中 heapster-v1.3.0 (gcr.io/google_containers/heapster-amd64:v1.3.0) pod 是 运行.
然而,当尝试通过 REST API 检索 heapster 指标时,似乎出现了一个问题,如下所示:
localhost:8001/api/v1/model/metrics
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "the server could not find the requested resource",
"reason": "NotFound",
"details": {},
"code": 404
}
和
localhost:8001/api/v1/proxy/namespaces/kube-system/services/heapster/
404 page not found
此外,kube-dns 似乎也无法访问
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "no endpoints available for service \"kube-dns\"",
"reason": "ServiceUnavailable",
"code": 503
}
使用 kubectl cluster-info
服务似乎运行良好。
关于从哪里开始调试问题有什么建议吗?
更新:
kubectl get pods -n kube-system
的结果
fluentd-gcp-v2.0-jp9qq 2/2 Running 0 87d
fluentd-gcp-v2.0-s2hpp 2/2 Running 0 19h
fluentd-gcp-v2.0-xlbq2 2/2 Running 0 19h
heapster-v1.3.0-1288166888-2j4b2 2/2 Running 0 19h
kube-dns-323615064-49klg 3/3 Running 0 19h
kube-dns-autoscaler-2667913178-dv2s3 1/1 Running 0 19h
kube-proxy-gke-acme-air-default-pool-c005178d-gkq6 1/1 Running 0 19h
kube-proxy-gke-acme-air-default-pool-c005178d-n3l7 1/1 Running 0 19h
kube-proxy-gke-acme-air-default-pool-c005178d-v9nn 1/1 Running 0 19h
kubernetes-dashboard-2917854236-wgh8f 1/1 Running 0 19h
l7-default-backend-1044750973-h5s9g 1/1 Running 0 19h
kubectl get svc -n kube-system
的结果
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default-http-backend 10.43.249.84 <nodes> 80:31149/TCP 160d
heapster 10.43.242.96 <none> 80/TCP 160d
kube-dns 10.43.240.10 <none> 53/UDP,53/TCP 160d
kubernetes-dashboard 10.43.243.31 <none> 80/TCP 160d
Heaspter 指标 API 将通过 Heapster 服务访问,而不是主要 API。模型 API 的路径是 http://localhost:8001/api/v1/proxy/namespaces/kube-system/services/heapster/api/v1/model/metrics
而不是 localhost:8001/api/v1/model/metrics
我是 运行 我在 GKE 上的 kubernetes v1.6.11-gke.0 集群。 在集群中 heapster-v1.3.0 (gcr.io/google_containers/heapster-amd64:v1.3.0) pod 是 运行.
然而,当尝试通过 REST API 检索 heapster 指标时,似乎出现了一个问题,如下所示:
localhost:8001/api/v1/model/metrics
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "the server could not find the requested resource",
"reason": "NotFound",
"details": {},
"code": 404
}
和
localhost:8001/api/v1/proxy/namespaces/kube-system/services/heapster/
404 page not found
此外,kube-dns 似乎也无法访问
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "no endpoints available for service \"kube-dns\"",
"reason": "ServiceUnavailable",
"code": 503
}
使用 kubectl cluster-info
服务似乎运行良好。
关于从哪里开始调试问题有什么建议吗?
更新:
kubectl get pods -n kube-system
fluentd-gcp-v2.0-jp9qq 2/2 Running 0 87d
fluentd-gcp-v2.0-s2hpp 2/2 Running 0 19h
fluentd-gcp-v2.0-xlbq2 2/2 Running 0 19h
heapster-v1.3.0-1288166888-2j4b2 2/2 Running 0 19h
kube-dns-323615064-49klg 3/3 Running 0 19h
kube-dns-autoscaler-2667913178-dv2s3 1/1 Running 0 19h
kube-proxy-gke-acme-air-default-pool-c005178d-gkq6 1/1 Running 0 19h
kube-proxy-gke-acme-air-default-pool-c005178d-n3l7 1/1 Running 0 19h
kube-proxy-gke-acme-air-default-pool-c005178d-v9nn 1/1 Running 0 19h
kubernetes-dashboard-2917854236-wgh8f 1/1 Running 0 19h
l7-default-backend-1044750973-h5s9g 1/1 Running 0 19h
kubectl get svc -n kube-system
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default-http-backend 10.43.249.84 <nodes> 80:31149/TCP 160d
heapster 10.43.242.96 <none> 80/TCP 160d
kube-dns 10.43.240.10 <none> 53/UDP,53/TCP 160d
kubernetes-dashboard 10.43.243.31 <none> 80/TCP 160d
Heaspter 指标 API 将通过 Heapster 服务访问,而不是主要 API。模型 API 的路径是 http://localhost:8001/api/v1/proxy/namespaces/kube-system/services/heapster/api/v1/model/metrics
而不是 localhost:8001/api/v1/model/metrics