Kubernetes Dashboard中的性能指标在Azure Kubernetes部署中缺失(Performance metrics in Kubernetes Dashboard missing in Azure Kubernetes deployment)
更新2:我可以通过使用grafana和influxDB获得统计信息。 但是,我发现这种矫枉过正。 我想看看我的集的当前状态,而不是去看历史趋势。 基于链接的图像,应该可以使用预先部署的Heapster和Kubernetes Dashboard
更新1:使用下面的命令,我确实看到资源信息。 我想这个问题的其余部分是为什么它没有出现(或者我应该如何配置它显示)在kubernetes仪表板中,如下图所示: https ://docs.giantswarm.io/img/dashboard -ui.png
$ kubectl top node AME CPU(cores) CPU% MEMORY(bytes) MEMORY% k8s-agentpool0-4120419-0 6m 1% 682Mi 9% k8s-agentpool0-4120419-1 m 1% 72Mi 10% k8s-agentpool0-4120419-10 6m 1% 690Mi 10% [truncated]我正在尝试监视Azure Kubernetes部署中的性能。 我注意到它有Heapster默认运行。 我没有启动这个,但是如果它在那里,就想利用它。 我的问题是:我如何访问它,或者有什么问题? 以下是我能想到的细节,让我知道你是否需要更多。
$ kubectl cluster-info Kubernetes master is running at https://[hidden]. Heapster is running at https://[hidden]./api/v1/namespaces/kube-system/services/heapster/proxy KubeDS is running at https://[hidden]./api/v1/namespaces/kube-system/services/kube-dns:dns/proxy kubernetes-dashboard is running at https://[hidden]./api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy tiller-deploy is running at https://[hidden]./api/v1/namespaces/kube-system/services/tiller-deploy:tiller/proxy我建立了一个代理:
$ kubectl proxy Starting to serve on 127.0.0.1:8001将我的浏览器指向
localhost:8001/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy/#!/workload?namespace=default我看到了kubernetes仪表板,但请注意,我没有看到在https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/上显示的性能图。 我也没有看到管理部分。
然后,我的浏览器指向localhost:8001 / api / v1 / namespaces / kube-system / services / heapster / proxy并获取
404 page not found检查豆荚:
kubectl get pods --namespace=kube-system AME READY STATUS RESTARTS AGE heapster-220595058-4w4b 2/2 Running 0 1d kube-addon-manager-k8s-master-4120419-0 1/1 Running 0 1d kube-apiserver-k8s-master-4120419-0 1/1 Running 0 1d kube-controller-manager-k8s-master-4120419-0 1/1 Running 0 1d kube-dns-v20-200046229-1j20h / Running 0 16h kube-dns-v20-200046229-hqwfn / Running 0 16h kube-proxy-0kwkf 1/1 Running 0 1d kube-proxy-1bh5 1/1 Running 0 1d [truncated] kube-proxy-zfbb1 1/1 Running 0 1d kube-scheduler-k8s-master-4120419-0 1/1 Running 0 1d kubernetes-dashboard-72940207-w7pt2 1/1 Running 0 1d tiller-deploy-007245560-4tk78 1/1 Running 0 1d检查日志:
$kubectl logs heapster-220595058-4w4b heapster --namespace=kube-system I009 06:11:21.241752 19 heapster.go:72] /heapster --source=kubernetes.summary_api:"" I009 06:11:21.24181 19 heapster.go:7] Heapster version v1.4.2 I009 06:11:21.24210 19 configs.go:61] Using Kubernetes client with master "https://10.0.0.1:44" and version v1 I009 06:11:21.2421 19 configs.go:62] Using kubelet port 10255 I009 06:11:21.24557 19 heapster.go:196] Starting with Metric Sink I009 06:11:21.44547 19 heapster.go:106] Starting heapster on port 8082 E009 14:14:05.00029 19 summary.go:89] ode k8s-agentpool0-4120419-2 is not ready E009 14:14:05.0001 19 summary.go:89] ode k8s-agentpool0-4120419-56 is not ready [truncated the other agent pool messages saying not ready] E009 14:24:05.000645 19 summary.go:89] ode k8s-master-4120419-0 is not ready $kubectl describe pod heapster-220595058-4w4b --namespace=kube-system ame: heapster-220595058-4w4b amespace: kube-system ode: k8s-agentpool0-4120419-54/10.240.0.11 Start Time: Fri, 09 Mar 2018 07:11:15 +0100 Labels: k8s-app=heapster pod-template-hash=220595058 Annotati: kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicaSet","namespace":"kube-system","name":"heapster-220595058","uid":"ac75e772-260-11e8-9e1c-00224807... scheduler.alpha.kubernetes.io/critical-pod= Status: Running IP: 10.244.58.2 Controlled By: ReplicaSet/heapster-220595058 Containers: heapster: Container ID: docker://a9205e7ab9070a1d1bdee4a1b9eb479972ad979c4d5e7d6b59ac15a91817 Image: k8s-gcrio./heapster-amd64:v1.4.2 Image ID: docker-pullable://k8s-gcrio./heapster-amd64@sha256:f58ded16b56884eeb7b1ba256bcc489714570bacdeca4d4bab91ef9897b20 Port: <none> Command: /heapster --source=kubernetes.summary_api:"" State: Running Started: Fri, 09 Mar 2018 07:11:20 +0100 Ready: True Restart Count: 0 Limits: cpu: 121m memory: 464Mi Requests: cpu: 121m memory: 464Mi Environment: <none> Mounts: /var/run/secrets/kubernetes.io/serviceaccount from heapster-token-txk8b (ro) heapster-nanny: Container ID: docker://68e02152a482f2abec844d6f9ea00a4a822b8d1004b7df4199d2c7dab4c Image: k8s-gcrio./addon-resizer:1.7 Image ID: docker-pullable://k8s-gcrio./addon-resizer@sha256:dcec9a5c2e20b8df19fe9eeb87d9054a9e94e71479b95d5cfdbede9ce15895 Port: <none> Command: /pod_nanny --cpu=80m --extra-cpu=0.5m --memory=140Mi --extra-memory=4Mi --threshold=5 --deployment=heapster --container=heapster --poll-period=00000 --estimator=exponential State: Running Started: Fri, 09 Mar 2018 07:11:18 +0100 Ready: True Restart Count: 0 Limits: cpu: 50m memory: 90Mi Requests: cpu: 50m memory: 90Mi Environment: MY_POD_AME: heapster-220595058-4w4b (v1:) MY_POD_AMESPACE: kube-system (v1:space) Mounts: /var/run/secrets/kubernetes.io/serviceaccount from heapster-token-txk8b (ro) Conditi: Type Status Initialized True Ready True PodScheduled True Volumes: heapster-token-txk8b: Type: Secret (a volume populated by a Secret) Secretame: heapster-token-txk8b Optional: false QoS Class: Guaranteed ode-Selectors: beta.kubernetes.io/os=linux Tolerati: <none> Events: <none>Update 2: I was able to get the statistics by using grafana and influxDB. However, I find this overkill. I want to see the current status of my cluster, not persee the historical trends. Based on the linked image, it should be possible by using the pre-deployed Heapster and the Kubernetes Dashboard
Update 1: With the command below, I do see resource information. I guess the remaining part of the question is why it is not showing up (or how I should configure it to show up) in the kubernetes dashboard, as shown in this image: https://docs.giantswarm.io/img/dashboard-ui.png
$ kubectl top node AME CPU(cores) CPU% MEMORY(bytes) MEMORY% k8s-agentpool0-4120419-0 6m 1% 682Mi 9% k8s-agentpool0-4120419-1 m 1% 72Mi 10% k8s-agentpool0-4120419-10 6m 1% 690Mi 10% [truncated]I am trying to monitor performance in my Azure Kubernetes deployment. I noticed it has Heapster running by default. I did not launch this one, but do want to leverage it if it is there. My question is: how can I access it, or is there something wrong with it? Here are the details I can think of, let me know if you need more.
$ kubectl cluster-info Kubernetes master is running at https://[hidden]. Heapster is running at https://[hidden]./api/v1/namespaces/kube-system/services/heapster/proxy KubeDS is running at https://[hidden]./api/v1/namespaces/kube-system/services/kube-dns:dns/proxy kubernetes-dashboard is running at https://[hidden]./api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy tiller-deploy is running at https://[hidden]./api/v1/namespaces/kube-system/services/tiller-deploy:tiller/proxyI set up a proxy:
$ kubectl proxy Starting to serve on 127.0.0.1:8001Point my browser to
localhost:8001/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy/#!/workload?namespace=defaultI see the kubernetes dashboard, but do notice that I do not see the performance graphs that are displayed at https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/. I also do not see the admin section.
I then point my browser to localhost:8001/api/v1/namespaces/kube-system/services/heapster/proxy and get
404 page not foundInspecting the pods:
kubectl get pods --namespace=kube-system AME READY STATUS RESTARTS AGE heapster-220595058-4w4b 2/2 Running 0 1d kube-addon-manager-k8s-master-4120419-0 1/1 Running 0 1d kube-apiserver-k8s-master-4120419-0 1/1 Running 0 1d kube-controller-manager-k8s-master-4120419-0 1/1 Running 0 1d kube-dns-v20-200046229-1j20h / Running 0 16h kube-dns-v20-200046229-hqwfn / Running 0 16h kube-proxy-0kwkf 1/1 Running 0 1d kube-proxy-1bh5 1/1 Running 0 1d [truncated] kube-proxy-zfbb1 1/1 Running 0 1d kube-scheduler-k8s-master-4120419-0 1/1 Running 0 1d kubernetes-dashboard-72940207-w7pt2 1/1 Running 0 1d tiller-deploy-007245560-4tk78 1/1 Running 0 1dChecking the log:
$kubectl logs heapster-220595058-4w4b heapster --namespace=kube-system I009 06:11:21.241752 19 heapster.go:72] /heapster --source=kubernetes.summary_api:"" I009 06:11:21.24181 19 heapster.go:7] Heapster version v1.4.2 I009 06:11:21.24210 19 configs.go:61] Using Kubernetes client with master "https://10.0.0.1:44" and version v1 I009 06:11:21.2421 19 configs.go:62] Using kubelet port 10255 I009 06:11:21.24557 19 heapster.go:196] Starting with Metric Sink I009 06:11:21.44547 19 heapster.go:106] Starting heapster on port 8082 E009 14:14:05.00029 19 summary.go:89] ode k8s-agentpool0-4120419-2 is not ready E009 14:14:05.0001 19 summary.go:89] ode k8s-agentpool0-4120419-56 is not ready [truncated the other agent pool messages saying not ready] E009 14:24:05.000645 19 summary.go:89] ode k8s-master-4120419-0 is not ready $kubectl describe pod heapster-220595058-4w4b --namespace=kube-system ame: heapster-220595058-4w4b amespace: kube-system ode: k8s-agentpool0-4120419-54/10.240.0.11 Start Time: Fri, 09 Mar 2018 07:11:15 +0100 Labels: k8s-app=heapster pod-template-hash=220595058 Annotati: kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicaSet","namespace":"kube-system","name":"heapster-220595058","uid":"ac75e772-260-11e8-9e1c-00224807... scheduler.alpha.kubernetes.io/critical-pod= Status: Running IP: 10.244.58.2 Controlled By: ReplicaSet/heapster-220595058 Containers: heapster: Container ID: docker://a9205e7ab9070a1d1bdee4a1b9eb479972ad979c4d5e7d6b59ac15a91817 Image: k8s-gcrio./heapster-amd64:v1.4.2 Image ID: docker-pullable://k8s-gcrio./heapster-amd64@sha256:f58ded16b56884eeb7b1ba256bcc489714570bacdeca4d4bab91ef9897b20 Port: <none> Command: /heapster --source=kubernetes.summary_api:"" State: Running Started: Fri, 09 Mar 2018 07:11:20 +0100 Ready: True Restart Count: 0 Limits: cpu: 121m memory: 464Mi Requests: cpu: 121m memory: 464Mi Environment: <none> Mounts: /var/run/secrets/kubernetes.io/serviceaccount from heapster-token-txk8b (ro) heapster-nanny: Container ID: docker://68e02152a482f2abec844d6f9ea00a4a822b8d1004b7df4199d2c7dab4c Image: k8s-gcrio./addon-resizer:1.7 Image ID: docker-pullable://k8s-gcrio./addon-resizer@sha256:dcec9a5c2e20b8df19fe9eeb87d9054a9e94e71479b95d5cfdbede9ce15895 Port: <none> Command: /pod_nanny --cpu=80m --extra-cpu=0.5m --memory=140Mi --extra-memory=4Mi --threshold=5 --deployment=heapster --container=heapster --poll-period=00000 --estimator=exponential State: Running Started: Fri, 09 Mar 2018 07:11:18 +0100 Ready: True Restart Count: 0 Limits: cpu: 50m memory: 90Mi Requests: cpu: 50m memory: 90Mi Environment: MY_POD_AME: heapster-220595058-4w4b (v1:) MY_POD_AMESPACE: kube-system (v1:space) Mounts: /var/run/secrets/kubernetes.io/serviceaccount from heapster-token-txk8b (ro) Conditi: Type Status Initialized True Ready True PodScheduled True Volumes: heapster-token-txk8b: Type: Secret (a volume populated by a Secret) Secretame: heapster-token-txk8b Optional: false QoS Class: Guaranteed ode-Selectors: beta.kubernetes.io/os=linux Tolerati: <none> Events: <none>最满意答案
我曾在过去看到,如果您重新启动仪表板吊舱,它就开始工作。 你能否真的很快尝试并让我知道?
I have seen in the past that if you restart the dashboard pod it starts working. Can you try that real fast and let me know?
#感谢您对电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格的认可,转载请说明来源于"电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格
推荐阅读
留言与评论(共有 10 条评论) |
本站网友 同喜同乐 | 2分钟前 发表 |
121m memory | |
本站网友 陈伟星 | 26分钟前 发表 |
20 +0100 Ready | |
本站网友 后现代城 | 6分钟前 发表 |
106] Starting heapster on port 8082 E009 14 | |
本站网友 阿比多尔片 | 5分钟前 发表 |
dcec9a5c2e20b8df19fe9eeb87d9054a9e94e71479b95d5cfdbede9ce15895 Port | |
本站网友 微信删除的聊天记录怎么恢复 | 8分钟前 发表 |
heapster-220595058-4w4b amespace | |
本站网友 广东财经网 | 8分钟前 发表 |
但请注意 | |
本站网友 一梦漫言 | 20分钟前 发表 |
464Mi Requests | |
本站网友 数模论坛 | 9分钟前 发表 |
kube-system (v1 | |
本站网友 天津大悦城 | 10分钟前 发表 |
false QoS Class |