quarkusio/quarkus · error · RuntimeException

A Kubernetes deployment was requested but no extension was f

Error message

A Kubernetes deployment was requested but no extension was found to build a container image. Consider adding one of following extensions: 

What it means

KubernetesDeployer.deploy aborts when a Kubernetes deployment was requested but no active container-image extension capability is present to build the image, and neither build nor push was explicitly disabled. It throws RuntimeException listing the container-image extensions that could be added.

Source

Thrown at extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/KubernetesDeployer.java:133

            KubernetesOutputDirectoryBuildItem outputDirectoryBuildItem,
            OpenShiftConfig openshiftConfig,
            ContainerImageConfig containerImageConfig,
            ApplicationInfoBuildItem applicationInfo,
            List<KubernetesOptionalResourceDefinitionBuildItem> optionalResourceDefinitions,
            BuildProducer<DeploymentResultBuildItem> deploymentResult,
            // needed to ensure that this step runs after the container image has been built
            @SuppressWarnings("unused") List<ArtifactResultBuildItem> artifactResults) {

        if (!KubernetesDeploy.INSTANCE.check(kubernetesClientBuilder)) {
            return;
        }

        if (selectedDeploymentTarget.isEmpty()) {

            if (!containerImageConfig.isBuildExplicitlyDisabled() &&
                    !containerImageConfig.isPushExplicitlyDisabled() &&
                    ContainerImageCapabilitiesUtil.getActiveContainerImageCapability(capabilities).isEmpty()) {
                throw new RuntimeException(
                        "A Kubernetes deployment was requested but no extension was found to build a container image. Consider adding one of following extensions: "
                                + CONTAINER_IMAGE_EXTENSIONS_STR + ".");
            }

            return;
        }

        try (final KubernetesClient client = kubernetesClientBuilder.buildClient()) {
            deploymentResult
                    .produce(deploy(selectedDeploymentTarget.get().getEntry(), client,
                            outputDirectoryBuildItem.getOutputDirectory(),
                            openshiftConfig, applicationInfo, optionalResourceDefinitions));
        }
    }

    /**
     * Determine a single deployment target out of the possible options.
     *

View on GitHub (pinned to e1c734241f)

Solutions

  1. Add a container image extension, e.g. mvn quarkus:add-extension -Dextensions='container-image-jib' (or docker/s2i/buildpack)
  2. If you only want manifests without image build, set quarkus.container-image.build=false and/or quarkus.container-image.push=false explicitly
  3. Verify capabilities with the build output — ensure the container-image extension is in the dependency list of the application

Example fix

// before (pom.xml: only quarkus-kubernetes)
<artifactId>quarkus-kubernetes</artifactId>
// after
<artifactId>quarkus-kubernetes</artifactId>
<dependency><artifactId>quarkus-container-image-jib</artifactId></dependency>
Defensive patterns

Strategy: validation

Validate before calling

boolean hasImageExt = dependencies.stream().anyMatch(d ->
    d.getArtifactId().startsWith("quarkus-container-image-"));
if (deployRequested && !hasImageExt) throw new IllegalStateException("Add quarkus-container-image-jib (or docker/s2i/buildpack)");

Prevention

When it happens

Trigger: quarkus.kubernetes.deploy=true (or -Dquarkus.kubernetes.deploy=true) while no container-image extension (container-image-docker, container-image-jib, container-image-s2i, container-image-buildpack) is on the classpath and image build/push is not explicitly disabled.

Common situations: Fresh project where the user added quarkus-kubernetes but no image builder; CI passing -Dquarkus.kubernetes.deploy=true without the image extension dependency; capability detection failing after removing a container-image extension.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/0d0b8d8e6e9e7bec. Report an issue: GitHub.