<p>I encountered the following error when added <strong>spring-cloud-starter-kubernetes-config</strong> dependency to my pom.xml:</p>
<pre><code>io.fabric8.kubernetes.client.KubernetesClientException: An error has occurred. Caused by: java.security.cert.CertificateException: Could not parse certificate: java.io.IOException: Empty input Caused by: java.io.IOException: Empty input
</code></pre>
<p>To disable k8s, I added in bootstrap.yml following param:</p>
<pre><code>spring:
  cloud:
    kubernetes:
      enabled: false
</code></pre>
<p>But even after that nothing changed and the error remained.</p>
<p>Where else should I look? What parameter should I add so that if I have this dependency in pom.xml, I disable Kubernetes when running tests?</p>

<p>As stated on the Spring Cloud Kubernetes documentation</p>
<blockquote>
<p>Also note that these properties: spring.cloud.kubernetes.config.enabled and spring.cloud.kubernetes.secrets.enabled only take effect when set in bootstrap.{properties|yml}</p>
</blockquote>
<p><a href="https://docs.spring.io/spring-cloud-kubernetes/docs/current/reference/html/#kubernetes-ecosystem-awareness" rel="nofollow noreferrer">https://docs.spring.io/spring-cloud-kubernetes/docs/current/reference/html/#kubernetes-ecosystem-awareness</a></p>
<p>So, to actually disable this property, it has to be set in <code>bootstrap.{properties|yml}</code> and not in <code>application.{properties|yml}</code>.</p>
<p>Also, you can pass the value as a VM option:</p>
<pre><code>-Dspring.cloud.kubernetes.enabled=false
</code></pre>
<p>if you want to run the application locally.</p>
