Simply  Seth
Simply Seth

Reputation: 3496

Kubernetes on Fedora 21 Pod Stays Pending

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_64

I created the below pod:

http://dpaste.com/2VSF8XA

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       Pending

Running kubectl get events shows:

NAME                KIND                STATUS              REASON              MESSAGE
nginxphp            Pod                 Pending             scheduled              Successfully assigned nginxphp to 10.0.0.10

The status never gets beyond "Pending"

What are the next steps to resolve this?

Upvotes: 0

Views: 1271

Answers (2)

Simply  Seth
Simply Seth

Reputation: 3496

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.

Upvotes: 0

lavalamp
lavalamp

Reputation: 399

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

Upvotes: 1

Related Questions