簡體   English   中英

Azure Kubernetes部署中缺少Kubernetes儀表板中的性能指標

[英]Performance metrics in Kubernetes Dashboard missing in Azure Kubernetes deployment

更新2:我能夠使用grafana和influxDB獲得統計信息。 但是,我發現這種矯kill過正。 我想查看群集的當前狀態,而不是查看歷史趨勢。 根據鏈接的圖像,應該可以使用預先部署的Heapster和Kubernetes儀表板

更新1:使用以下命令,我確實看到了資源信息。 我猜問題的其余部分是為什么它沒有在kubernetes儀表板中顯示(或如何配置它以顯示),如下圖所示: https ://docs.giantswarm.io/img/dashboard -ui.png

$ kubectl top node
NAME                         CPU(cores)   CPU%      MEMORY(bytes)   MEMORY%   
k8s-agentpool0-41204139-0    36m          1%        682Mi           9%        
k8s-agentpool0-41204139-1    33m          1%        732Mi           10%       
k8s-agentpool0-41204139-10   36m          1%        690Mi           10%  
[truncated]

我正在嘗試監視Azure Kubernetes部署中的性能。 我注意到它默認運行Heapster。 我沒有啟動此程序,但確實想利用它。 我的問題是:如何訪問它,或者它有問題? 這是我能想到的細節,如果您需要更多,請告訴我。

$ kubectl cluster-info
Kubernetes master is running at https://[hidden].uksouth.cloudapp.azure.com
Heapster is running at https://[hidden].uksouth.cloudapp.azure.com/api/v1/namespaces/kube-system/services/heapster/proxy
KubeDNS is running at https://[hidden].uksouth.cloudapp.azure.com/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
kubernetes-dashboard is running at https://[hidden].uksouth.cloudapp.azure.com/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy
tiller-deploy is running at https://[hidden].uksouth.cloudapp.azure.com/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
NAME                                            READY     STATUS    RESTARTS   AGE
heapster-2205950583-43w4b                       2/2       Running   0          1d
kube-addon-manager-k8s-master-41204139-0        1/1       Running   0          1d
kube-apiserver-k8s-master-41204139-0            1/1       Running   0          1d
kube-controller-manager-k8s-master-41204139-0   1/1       Running   0          1d
kube-dns-v20-2000462293-1j20h                   3/3       Running   0          16h
kube-dns-v20-2000462293-hqwfn                   3/3       Running   0          16h
kube-proxy-0kwkf                                1/1       Running   0          1d
kube-proxy-13bh5                                1/1       Running   0          1d
[truncated]
kube-proxy-zfbb1                                1/1       Running   0          1d
kube-scheduler-k8s-master-41204139-0            1/1       Running   0          1d
kubernetes-dashboard-732940207-w7pt2            1/1       Running   0          1d
tiller-deploy-3007245560-4tk78                  1/1       Running   0          1d

檢查日志:

$kubectl logs heapster-2205950583-43w4b heapster  --namespace=kube-system
I0309 06:11:21.241752      19 heapster.go:72] /heapster --source=kubernetes.summary_api:""
I0309 06:11:21.241813      19 heapster.go:73] Heapster version v1.4.2
I0309 06:11:21.242310      19 configs.go:61] Using Kubernetes client with master "https://10.0.0.1:443" and version v1
I0309 06:11:21.242331      19 configs.go:62] Using kubelet port 10255
I0309 06:11:21.243557      19 heapster.go:196] Starting with Metric Sink
I0309 06:11:21.344547      19 heapster.go:106] Starting heapster on port 8082
E0309 14:14:05.000293      19 summary.go:389] Node k8s-agentpool0-41204139-32 is not ready
E0309 14:14:05.000331      19 summary.go:389] Node k8s-agentpool0-41204139-56 is not ready
[truncated the other agent pool messages saying not ready]
E0309 14:24:05.000645      19 summary.go:389] Node k8s-master-41204139-0 is not ready


$kubectl describe pod heapster-2205950583-43w4b  --namespace=kube-system
Name:           heapster-2205950583-43w4b
Namespace:      kube-system
Node:           k8s-agentpool0-41204139-54/10.240.0.11
Start Time:     Fri, 09 Mar 2018 07:11:15 +0100
Labels:         k8s-app=heapster
                pod-template-hash=2205950583
Annotations:    kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicaSet","namespace":"kube-system","name":"heapster-2205950583","uid":"ac75e772-2360-11e8-9e1c-00224807...
            scheduler.alpha.kubernetes.io/critical-pod=
Status:         Running
IP:             10.244.58.2
Controlled By:  ReplicaSet/heapster-2205950583
Containers:
  heapster:
    Container ID:  docker://a9205e7ab9070a1d1bdee4a1b93eb47339972ad979c4d35e7d6b59ac15a91817
    Image:         k8s-gcrio.azureedge.net/heapster-amd64:v1.4.2
    Image ID:      docker-pullable://k8s-gcrio.azureedge.net/heapster-amd64@sha256:f58ded16b56884eeb73b1ba256bcc489714570bacdeca43d4ba3b91ef9897b20
    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://68e021532a482f32abec844d6f9ea00a4a8232b8d1004b7df4199d2c7d3a3b4c
    Image:         k8s-gcrio.azureedge.net/addon-resizer:1.7
    Image ID:      docker-pullable://k8s-gcrio.azureedge.net/addon-resizer@sha256:dcec9a5c2e20b8df19f3e9eeb87d9054a9e94e71479b935d5cfdbede9ce15895
    Port:          <none>
    Command:
      /pod_nanny
      --cpu=80m
      --extra-cpu=0.5m
      --memory=140Mi
      --extra-memory=4Mi
      --threshold=5
      --deployment=heapster
      --container=heapster
      --poll-period=300000
      --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_NAME:       heapster-2205950583-43w4b (v1:metadata.name)
      MY_POD_NAMESPACE:  kube-system (v1:metadata.namespace)
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from heapster-token-txk8b (ro)
Conditions:
  Type           Status
  Initialized    True 
  Ready          True 
  PodScheduled   True 
Volumes:
  heapster-token-txk8b:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  heapster-token-txk8b
    Optional:    false
QoS Class:       Guaranteed
Node-Selectors:  beta.kubernetes.io/os=linux
Tolerations:     <none>
Events:          <none>

過去我曾看到,如果重新啟動儀表板窗格,它將開始工作。 您能快速嘗試一下並讓我知道嗎?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM