<p>I have created and deployed successfully one service in <code>kubernetes</code> named <em>rest_api_service</em>.</p>

<p>I have another project which needs to call a resource from <em>rest_api_service</em>. So, in order to get out the IP of my service, I tried to inject:</p>

<pre><code>@Inject
@ServiceName("luz-person-service")
String serivceUrl;
</code></pre>

<p>But my Eclipse shows me this warn message:</p>

<pre><code>&gt; No bean is eligible for injection to the injection point [JSR-346
&gt; §5.2.2]
</code></pre>

<p>Therefore I can not build it in <code>wildfly</code>.</p>

<p>Currently, I am working only on pure <code>Java EE 7</code> and I'm using the following dependency:</p>

<pre><code>&lt;dependency&gt;
    &lt;groupId&gt;io.fabric8&lt;/groupId&gt;
    &lt;artifactId&gt;fabric8-cdi&lt;/artifactId&gt;
    &lt;version&gt;2.1.11&lt;/version&gt;
&lt;/dependency&gt; 
</code></pre>

<p>Do you guys have any idea?</p>

<p>Pods are automatically injected with environment variables containing information about services in their namespace.  As an example, say your pod is in a namespace that also contains a service named 'foo'.  The containers in your pod will be injected with:</p>

<pre><code>FOO_SERVICE_HOST=&lt;host service foo is reachable at&gt;
FOO_SERVICE_PORT=&lt;port service foo is reachable at&gt;
</code></pre>

<p>as well as docker-links style environment variables.  Check out <a href="https://github.com/kubernetes/kubernetes/blob/master/docs/user-guide/services.md#discovering-services" rel="nofollow">the docs here</a>.</p>
