我在哪裏,我想運行一個容器沒有出現在我的羣集上被入門的問題。可安排莢無節點,使用谷歌容器引擎
我試着摸索可行的解決方案,但有一個令人驚訝的缺乏信息在那裏,以協助這個問題或任何的它的性質。
這裏是最讓我可以收集:
$ kubectl describe pods/elasticsearch
Name: elasticsearch
Namespace: default
Image(s): my.image.host/my-project/elasticsearch
Node: /
Labels: <none>
Status: Pending
Reason:
Message:
IP:
Replication Controllers: <none>
Containers:
elasticsearch:
Image: my.image.host/my-project/elasticsearch
Limits:
cpu: 100m
State: Waiting
Ready: False
Restart Count: 0
Events:
FirstSeen LastSeen Count From SubobjectPath Reason Message
Mon, 19 Oct 2015 10:28:44 -0500 Mon, 19 Oct 2015 10:34:09 -0500 12 {scheduler } failedScheduling no nodes available to schedule pods
我也看到了這一點:
$ kubectl get pod elasticsearch -o wide
NAME READY STATUS RESTARTS AGE NODE
elasticsearch 0/1 Pending 0 5s
我想我想知道:什麼先決條件存在,這樣我可以確信,我的容器將在容器引擎中運行?在這種情況下我需要做些什麼才能使其運行?
這是我的yml
文件:
apiVersion: v1
kind: Pod
metadata:
name: elasticsearch
spec:
containers:
- name: elasticsearch
image: my.image.host/my-project/elasticsearch
ports:
- containerPort: 9200
resources:
volumeMounts:
- name: elasticsearch-data
mountPath: /usr/share/elasticsearch
volumes:
- name: elasticsearch-data
gcePersistentDisk:
pdName: elasticsearch-staging
fsType: ext4
這裏是我的節點多一些輸出:
$ kubectl get nodes
NAME LABELS STATUS
gke-elasticsearch-staging-00000000-node-yma3 kubernetes.io/hostname=gke-elasticsearch-staging-00000000-node-yma3 NotReady
我的原始輸出符合你的要求,但我添加了'gcloud'的輸出。肯定有一個集羣。 –
對不起,我錯過了。首先嚐試'kubectl describe nodes'來了解爲什麼節點沒有準備好。 '/ var/log/kubelet.log'會有更多的信息,但是很難閱讀。 –