quarkusio/quarkus · error · IOException

Resource not found: " + manifestPath

Error message

Resource not found: " + manifestPath

What it means

Dev Services for Kubernetes loads a manifest (kube resources for the kind cluster) either from a URL or, after a MalformedURLException, from the classpath. When the path is not a valid URL and no classpath resource exists at that path, an IOException 'Resource not found: <path>' is thrown.

Source

Thrown at extensions/kubernetes-client/deployment/src/main/java/io/quarkus/kubernetes/client/deployment/DevServicesKubernetesProcessor.java:299

                }
            }
        } catch (Exception e) {
            log.error("Failed to create Kubernetes client while trying to apply manifests.", e);
        }
    }

    private InputStream getManifestStream(String manifestPath) throws IOException {
        try {
            URL url = new URL(manifestPath);
            // For file:// URLs, optionally check if you want to support those or not
            return url.openStream();
        } catch (MalformedURLException e) {
            // Not a URL, so treat as classpath resource
            InputStream stream = Thread.currentThread()
                    .getContextClassLoader()
                    .getResourceAsStream(manifestPath);
            if (stream == null) {
                throw new IOException("Resource not found: " + manifestPath);
            }
            return stream;
        }
    }

    @SuppressWarnings("rawtypes")
    private <T extends KubernetesVersionEnum<T>, C extends KubernetesContainer> C createContainer(
            Function<KubernetesImageSpec<T>, C> constructor,
            Class<T> versionClass,
            KubernetesDevServiceCfg config,
            Flavor flavor) {
        T version = config.apiVersion
                .map(v -> findOrElseThrow(flavor, v, versionClass))
                .orElseGet(() -> latest(versionClass));

        KubernetesImageSpec<T> imageSpec = version.withImage(config.imageName);
        return constructor.apply(imageSpec);
    }

View on GitHub (pinned to e1c734241f)

Solutions

  1. Correct the manifest path in quarkus.kubernetes-client.dev-services.manifests (check spelling/relative path).
  2. Move the manifest into src/main/resources (or test resources) so it lands on the classpath.
  3. Verify the file exists at the configured location: ls <path>, or use an absolute file:// URL if outside the classpath.

Example fix

// before
quarkus.kubernetes-client.dev-services.manifests=manifests/kube.yaml // missing
// after
quarkus.kubernetes-client.dev-services.manifests=kubernetes/kube.yaml // file exists in src/main/resources
Defensive patterns

Strategy: validation

Validate before calling

// Verify each configured manifest resolves before running dev services
for (String m : manifests) {
    try {
        new URL(m).openStream().close();
    } catch (MalformedURLException e) {
        if (Thread.currentThread().getContextClassLoader().getResourceAsStream(m) == null
                && !Files.exists(Path.of(m))) {
            throw new IllegalStateException("Manifest not resolvable: " + m);
        }
    }
}

Try / catch

try {
    startDevServices();
} catch (IOException e) {
    if (e.getMessage().startsWith("Resource not found:")) {
        throw new ConfigurationException("Fix quarkus.kubernetes-client.dev-services.manifests path: "
            + e.getMessage(), e);
    }
    throw e;
}

Prevention

When it happens

Trigger: quarkus.kubernetes-client.dev-services.manifests (or similar dev services manifest config) references a file path that is neither a resolvable URL nor present on the classpath.

Common situations: Typo in the manifest path in application.properties; manifest file not placed under src/main/resources or test resources; path valid on a dev machine but absent in CI.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


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