Problem description
- You want to create a new kubernetes.yml File
- But mvnw clean package fails when running with quarkus kubernetes Extension.
- Error: JcaPEMKeyConverter is provided by BouncyCastle, an optional dependency.
- Reference:
- https://stackoverflow.com/questions/68761409/jcapemkeyconverter-is-provided-by-bouncycastle-an-optional-dependency-to-use-s
- https://github.com/fabric8io/kubernetes-client/pull/1798
Action | Details |
---|---|
Install kubernetes Extension | # ./mvnw quarkus:add-extension -Dextensions=”kubernetes” |
Run mvn package | # ./mvnw clean package -DskipTests -Dquarkus.container-image.push=true |
Error Stack | ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:2.5.0.Final:build (default) on project first-quarkus-sample: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors [ERROR] [error]: Build step io.quarkus.kubernetes.client.deployment.KubernetesClientBuildStep#process threw an exception: io.fabric8.kubernetes.client.KubernetesClientException: JcaPEMKeyConverter is provided by BouncyCastle, an optional dependency. To use support for EC Keys you must explicitly add this dependency to classpath. [ERROR] at io.fabric8.kubernetes.client.internal.CertUtils.handleECKey(CertUtils.java:160) [ERROR] at io.fabric8.kubernetes.client.internal.CertUtils.loadKey(CertUtils.java:130) [ERROR] at io.fabric8.kubernetes.client.internal.CertUtils.createKeyStore(CertUtils.java:108) [ERROR] at io.fabric8.kubernetes.client.internal.CertUtils.createKeyStore(CertUtils.java:244) [ERROR] at io.fabric8.kubernetes.client.internal.SSLUtils.keyManagers(SSLUtils.java:128) [ERROR] at io.fabric8.kubernetes.client.internal.SSLUtils.keyManagers(SSLUtils.java:122) [ERROR] at io.fabric8.kubernetes.client.utils.HttpClientUtils.createHttpClient(HttpClientUtils.java:148) [ERROR] at io.fabric8.kubernetes.client.utils.HttpClientUtils.createHttpClient(HttpClientUtils.java:85) [ERROR] at io.fabric8.kubernetes.client.BaseClient.(BaseClient.java:53) |
- Run ./mvnw clean package -DskipTests -Dquarkus.container-image.push=true

Fix add following bouncycastle dependencies to your pom.xml
<dependencies> <dependency> <groupId>org.bouncycastle</groupId> <artifactId>bcpkix-jdk15on</artifactId> <version>1.69</version> </dependency> <dependency> <groupId>org.bouncycastle</groupId> <artifactId>bcprov-jdk15on</artifactId> <version>1.69</version> </dependency> <dependency> <groupId>org.bouncycastle</groupId> <artifactId>bcprov-ext-jdk15on</artifactId> <version>1.69</version> </dependency>
Be First to Comment