fabric8-maven-plugin: kubernetes.yml doesn't include the registry prefix

Just been updating the fabric8 docs and need to check the workflow for f-m-p…

If I generate a springboot quickstart and deploy it on a kubernetes cluster (not minikube) I add the fabric8:push goal which does push the image but the pod fails to start and it can’t find the image, the registry prefix was never added to the kubernetes.yml

to recreate (registry is behind VPN sorry incase others want to recreate)

mvn org.apache.maven.plugins:maven-archetype-plugin:2.2:generate -Dfilter=io.fabric8:spring-boot-camel-archetype -DgroupId=my.test -DartifactId=fabric8-test-project
cd fabric8-test-project
mvn clean fabric8:run  -Ddocker.push.registry=fabric8-docker-registry.default.beast.fabric8.io
kubectl get pods
fabric8-test-project-2364102176-hjgtf      0/1       ErrImagePull       0          7s
kubectl describe pod fabric8-test-project-2364102176-hjgtf 
Failed to pull image "test/fabric8-test-project:latest": Error: image test/fabric8-test-project:latest not found

Checking the ./target/classes/META-INF/fabric8/kubernetes.yml shows the registry isn’t added to the image name

        containers:
          image: "test/fabric8-test-project:latest"

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 19 (8 by maintainers)

Commits related to this issue

Most upvoted comments

@rhuss Is there any way of influencing the generated kubernetes.yml file to include a registry prefix and still use a generator (rather than XML or external Dockerfile) to generate the image? It seems that as soon as I add an <image> tag I am taking on the responsibility for controlling the image generation there, not just its name (and specifying just a <registry> element has no effect on kubernetes.yml). Thanks.