Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

309
Visualizações
Unable to generate Kubernetes manifests yaml files using JKube maven plugin

I'm trying to generate my Kubernetes manifests (deployment.yml and service.yml) using JKube via this command : mvn k8s:resource

But I'm getting this error :

[INFO] Scanning for projects...
[INFO] 
[INFO] -------------------< io.social.carpooling:trips-api >-------------------
[INFO] Building trips-api 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- kubernetes-maven-plugin:1.1.1:resource (default-cli) @ trips-api ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.979 s
[INFO] Finished at: 2021-03-18T19:11:24+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.jkube:kubernetes-maven-plugin:1.1.1:resource (default-cli) on project trips-api: Execution default-cli of goal org.eclipse.jkube:kubernetes-maven-plugin:1.1.1:resource failed.: NullPointerException -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

Here is what my pom.xml looks like :

<properties>
        ...
        <jkube.version>1.1.1</jkube.version>
        <jkube.generator.name>my-dockerhub-username/${project.artifactId}:${project.version}</jkube.generator.name>
        ...
</properties>
...
<plugin>
            <groupId>org.eclipse.jkube</groupId>
            <artifactId>kubernetes-maven-plugin</artifactId>
            <version>${jkube.version}</version>
            <configuration>
                <images>
                    <image>
                        <name>my-dockerhub-username/${project.artifactId}:${project.version}</name>
                    </image>
                </images>
            </configuration>
 </plugin>

I tried to get more details using the plugin documentation but I didn't found so much. Is there anyone who successfully generated the yaml files and deployed to Kubernetes cluster.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Update:

Apparently this was a bug in Eclipse JKube(eclipse/jkube#624) that wasn't allowing users to configure image name using provided properties in simple Dockerfile mode. This has been fixed in new release v1.2.0.

Now you should be able to configure image name using jkube.generator.name. You don't need to provide XML configuration in order to override default image name. Earlier you're providing XML configuration without any <build> configuration which was causing this NPE. As per Kuberntes Maven Plugin Documentation this field is mandatory when providing image XML configuration. configuration image configuration docs table

We're going to fix this NPE(eclipse/jkube#618) in upcoming releases too so that users can be informed when they don't provide a image build

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda