Uploaded image for project: 'Quarkus'
  1. Quarkus
  2. QUARKUS-3201

Deploying to local kubernetes needs workaround

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Critical Critical
    • None
    • 2.13.7.SP3.CR1
    • kubernetes, team/eng
    • None
    • ---

      Following https://quarkus.io/guides/deploying-to-kubernetes we can notice that generated kubernetes files contain

      "imagePullPolicy" : "Always"
      

      which is probably OK on non-local kubernetes. But if we want to use local kubernetes (Kubernetes from Docker for desktop on MacOS) for playing/developing we must use workaround eg.

      quarkus.kubernetes.image-pull-policy=IfNotPresent
      

      otherwise it tries to pull the image from dockerhub even it is already present locally.

      Related issue https://github.com/quarkusio/quarkus/issues/29209#issuecomment-1558814740, which is basically another issue, as

      [INFO] --- quarkus-maven-plugin:2.13.7.Final-redhat-00003:build (build) @ camel-quarkus-examples-cxf-soap ---
      [WARNING] [io.quarkus.kubernetes.deployment.KubernetesDeployer] A Kubernetes deployment was requested, but the container image to be built will not be pushed to any registry because "quarkus.container-image.registry" has not been set. The Kubernetes deployment will only work properly if the cluster is using the local Docker daemon. For that reason 'ImagePullPolicy' is being force-set to 'IfNotPresent'.
      

      is not true. It will always generate Always.

      This combination is really frustrating starting point for developers on local kubernetes.

            ikanello1@redhat.com Ioannis Kanellos
            llowinge@redhat.com Lukas Lowinger
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: