I've setup a kubernetes three node cluster using: Fedora 21
kubernetes-0.7.0-18.0.git52e165a.fc21.x86_64
docker-io-1.4.0-1.fc21.x86_64I created the below pod:
Running kubectl get minions shows:
NAME LABELS
10.0.0.10 <none>
10.0.0.9 <none>I run kubectl create -f podfile.json
Running kubectl get pod nginxphp shows:
NAME IMAGE(S) HOST LABELS STATUS
nginxphp million12/nginx-php 10.0.0.10/ name=nginxphp PendingRunning kubectl get events shows:
NAME KIND STATUS REASON MESSAGE
nginxphp Pod Pending scheduled Successfully assigned nginxphp to 10.0.0.10The status never gets beyond "Pending"
What are the next steps to resolve this?
I stumbled upon the solution.
+-----------+--------+--------------------------------+
| Name | Status | Networks |
+-----------+--------+--------------------------------+
| kub001 | ACTIVE | private=10.0.0.18, 200.7.6.215 |
| minion001 | ACTIVE | private=10.0.0.20, 200.7.6.217 |
| minion002 | ACTIVE | private=10.0.0.19, 200.7.6.216 |
+-----------+--------+--------------------------------+
On the master, in /etc/kubernetes/controller-manager, I have:
KUBELET_ADDRESSES="--machines=10.0.0.20,10.0.0.19"On minion002, in /etc/kubernetes/kubelet, I have:
KUBELET_HOSTNAME="--hostname_override=10.0.0.19"As long as the above two match, everything is happy, well almost.
The hostnames are bound to the floating external addresses, but cluster traffic is on the internal, private network and that is why hostname_override is needed.
It runs, but it still shows as pending on the master when I do kubectl get events, I call that progress.
NAME KIND STATUS REASON
nginxphp Pod Pending scheduled
nginxphp Pod Pending scheduled
I don't know how to clear out the events from previous attempts, but its working... I think.
Check the first entry here; I suspect your kubelet and apiserver disagree about what your kubelet is called.
https://github.com/GoogleCloudPlatform/kubernetes/wiki/Debugging-FAQ#by-symptom