<p>I'm trying to deploy my Lagom accessservices on Kubernetes.</p>

<p>To do that I tried to containerize my service using fabric8’s docker-maven-plugin.</p>

<p>So, I added the following plugin settings to the root project pom.xml to register the fabric8 Maven plugin:</p>

<pre><code>&lt;plugin&gt;
    &lt;groupId&gt;io.fabric8&lt;/groupId&gt;
    &lt;artifactId&gt;docker-maven-plugin&lt;/artifactId&gt;
    &lt;version&gt;0.20.1&lt;/version&gt;
    &lt;configuration&gt;
        &lt;skip&gt;true&lt;/skip&gt;
        &lt;images&gt;
            &lt;image&gt;
                &lt;name&gt;%g/%a:%l&lt;/name&gt;
                &lt;build&gt;
                    &lt;from&gt;openjdk:8-jre-alpine&lt;/from&gt;
                    &lt;tags&gt;
                        &lt;tag&gt;latest&lt;/tag&gt;
                        &lt;tag&gt;${project.version}&lt;/tag&gt;
                    &lt;/tags&gt;
                    &lt;assembly&gt;
                        &lt;descriptorRef&gt;artifact-with-dependencies&lt;/descriptorRef&gt;
                    &lt;/assembly&gt;
                &lt;/build&gt;
            &lt;/image&gt;
        &lt;/images&gt;
    &lt;/configuration&gt;
 &lt;/plugin&gt;
</code></pre>

<p>And then, I Added the following plugin settings on the pom.xml under the application’s module directory:</p>

<pre><code>&lt;plugin&gt;
    &lt;groupId&gt;io.fabric8&lt;/groupId&gt;
    &lt;artifactId&gt;docker-maven-plugin&lt;/artifactId&gt;
    &lt;configuration&gt;
        &lt;skip&gt;false&lt;/skip&gt;
        &lt;images&gt;
            &lt;image&gt;
                &lt;build&gt;
                    &lt;entryPoint&gt;
                        java -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -cp '/maven/*' -Dhttp.address="$(eval "echo $ACCESSSERVICE_BIND_IP")" -Dhttp.port="$(eval "echo $ACCESSSERVICE_BIND_PORT")" -Dakka.remote.netty.tcp.hostname="$(eval "echo $AKKA_REMOTING_HOST")" -Dakka.remote.netty.tcp.bind-hostname="$(eval "echo $AKKA_REMOTING_BIND_HOST")" -Dakka.remote.netty.tcp.port="$(eval "echo $AKKA_REMOTING_PORT")" -Dakka.remote.netty.tcp.bind-port="$(eval "echo $AKKA_REMOTING_BIND_PORT")" $(IFS=','; I=0; for NODE in $AKKA_SEED_NODES; do echo "-Dakka.cluster.seed-nodes.$I=akka.tcp://accessservice@$NODE"; I=$(expr $I + 1); done) play.core.server.ProdServerStart
                    &lt;/entryPoint&gt;
                &lt;/build&gt;
            &lt;/image&gt;
        &lt;/images&gt;
    &lt;/configuration&gt;
&lt;/plugin&gt;
</code></pre>

<p>After that, I build my project using:</p>

<pre><code>eval $(minikube docker-env) 
clean package docker:build
</code></pre>

<p>And I think that it was succeeded because when I executed "docker images", I had:</p>

<p><a href="https://i.stack.imgur.com/AIYQU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AIYQU.png" alt="enter image description here"></a></p>

<p>But my problem is when I tried to deploy my services, I got this error:</p>

<blockquote>
  <p>Container image is not present with pull policy of NeverError syncing
  pod
  <a href="https://i.stack.imgur.com/TTVXc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TTVXc.png" alt="enter image description here"></a></p>
</blockquote>

<p>Do you have any explication for that? please.</p>

<p>*** Edit 1 ****</p>

<blockquote>
  <p>kubectl describe po accessservice-0
  <a href="https://i.stack.imgur.com/X0G64.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X0G64.png" alt="enter image description here"></a></p>
</blockquote>

<p>You need to use other <code>imagePullPolicy</code> different than <code>Never</code>, otherwise kubernetes will never try to download the image for your container. <a href="https://kubernetes.io/docs/concepts/configuration/overview/#container-images" rel="nofollow noreferrer">You can choose</a> between Always or IfNotPresent, which will download the image only if it's not already downloaded. For example</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: my-app
spec:
  containers:
    - name: my-app
      image: my-app-image
      imagePullPolicy: Always
</code></pre>
