I encountered the following error when added spring-cloud-starter-kubernetes-config dependency to my pom.xml:
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
To disable k8s, I added in bootstrap.yml following param:
spring:
cloud:
kubernetes:
enabled: false
But even after that nothing changed and the error remained.
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?
That problem could happen due to the installed kubectl
. The easiest way to avoid this problem - rename ~/.kube
(directory with configs) to some other name like ~/.kube-hide
mv ~/.kube ~/.kube-hide
And when you will need to use your kubectl
rename it back