<p>When I run exec command</p>

<pre><code> kubectl exec kubia-zgxn9 -- curl -s http://10.47.252.17
Error from server (BadRequest): pod kubia-zgxn9 does not have a host assigned
</code></pre>

<p>Describe pod shows host</p>

<pre><code>IP:             
Controlled By:  ReplicationController/kubia
Containers:
  kubia:
    Image:      luksa/kubia
    Port:       8080/TCP
    Host Port:  0/TCP
    Requests:
      cpu:        100m
    Environment:  &lt;none&gt;
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-xs7qx (ro)
</code></pre>

<p>This is my service</p>

<pre><code>Name:              kubia
Namespace:         default
Labels:            &lt;none&gt;
Annotations:       &lt;none&gt;
Selector:          app=kubia
Type:              ClusterIP
IP:                10.47.252.17
Port:              &lt;unset&gt;  80/TCP
TargetPort:        8080/TCP
Endpoints:         &lt;none&gt;
Session Affinity:  None
Events:            &lt;none&gt;
</code></pre>

<p>Why did I get error from server?</p>

<p>The Pod is probably not yet scheduled to a Node.</p>

<p>Maybe it just took a little longer than expected or perhaps it's asking for resources that no node can satisfy at the moment.</p>

<p>Check the output of <code>kubectl get pod kubia-zgxn9</code> and see if the state is <code>Running</code>. If so, retry now. If it still fails to exec this might be a bug.</p>

<p>If it's not running, check the describe output for notices. (Unfortunately you cut the output short in your question so we can't see what's wrong with it).</p>
