我正在使用azure的容器引擎運行kubernetes集羣。我有一個kubernetes服務的問題,那是一個資源監視heapster
。這個吊艙每分鐘都會重新啓動或類似的東西。我嘗試刪除heapster部署,replicaset和pod,然後重新創建部署。它立即返回相同的行爲。Kubernetes監控服務heapster不斷重啓
當我看資源與heapster標籤,它看起來有點有點怪:
$ kubectl get deploy,rs,po -l k8s-app=heapster --namespace=kube-system
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
deploy/heapster 1 1 1 1 17h
NAME DESIRED CURRENT READY AGE
rs/heapster-2708163903 1 1 1 17h
rs/heapster-867061013 0 0 0 17h
NAME READY STATUS RESTARTS AGE
po/heapster-2708163903-vvs1d 2/2 Running 0 0s
出於某種原因,在兩個副本集。即使在我刪除所有資源並重新部署它們時,名爲rs/heapster-867061013
的那個也會重新出現。上面還顯示了該容器剛剛開始,這是它不斷創建的問題,然後運行幾秒鐘,然後創建一個新容器。我是運行kubernetes的新手,所以我不確定哪些日誌文件與此問題相關。
從heapster容器
heapster.go:72] /heapster source=kubernetes.summary_api:""
heapster.go:73] Heapster version v1.3.0
configs.go:61] Using Kubernetes client with master "https://10.0.0.1:443" and version v1
configs.go:62] Using kubelet port 10255
heapster.go:196] Starting with Metric Sink
heapster.go:106] Starting heapster on port 8082
從heapster保姆容器日誌日誌
pod_nanny.go:56] Invoked by [/pod_nanny --cpu=80m --extra-cpu=0.5m --memory=140Mi --extra-memory=4Mi --threshold=5 --deployment=heapster --container=heapster --poll-period=300000 --estimator=exponential]
pod_nanny.go:68] Watching namespace: kube-system, pod: heapster-2708163903-mqlsq, container: heapster.
pod_nanny.go:69] cpu: 80m, extra_cpu: 0.5m, memory: 140Mi, extra_memory: 4Mi, storage: MISSING, extra_storage: 0Gi
pod_nanny.go:110] Resources: [{Base:{i:{value:80 scale:-3} d:{Dec:<nil>} s:80m Format:DecimalSI} ExtraPerNode:{i:{value:5 scale:-4} d:{Dec:<nil>} s: Format:DecimalSI} Name:cpu} {Base:{i:{value:146800640 scale:0} d:{Dec:<nil>} s:140Mi Format:BinarySI} ExtraPerNode:{i:{value:4194304 scale:0} d:{Dec:<nil>} s:4Mi Format:BinarySI} Name:memory}]
heapster pod的日誌說什麼?它是否由於某種錯誤而退出?另外哪個[restartPolicy](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy)爲該窗格設置? – fishi
@fishi我已將日誌添加到問題 –
該吊艙已重新啓動策略始終 –