Question regarding SpringBootAdmin server with Kubernetes please.
I have a very simple SpringBootAdmin Server application as follow
@EnableScheduling
@EnableDiscoveryClient
@EnableAdminServer
@EnableConfigServer
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class);
}
}
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-server</artifactId>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-kubernetes</artifactId>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server-ui</artifactId>
<version>2.3.0</version>
</dependency>
It starts up fine on local machine. However, when put onto a Kubernetes environment, it yields:
ERROR [,e6d057e7abaf4a65,e6d057e7abaf4a65,true] 62 --- [ scheduling-1] o.s.c.k.d.KubernetesCatalogWatch : Error watching Kubernetes Services
io.fabric8.kubernetes.client.KubernetesClientException: Operation: [list] for kind: [Endpoints] with name: [null] in namespace: [null] failed.
at io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:64) ~[kubernetes-client-4.10.3.jar!/:na]
Why those [null] please? I did use
spring.cloud.kubernetes.config.namespace=my-namespace
What is the issue please?
Thank you