问题描述
关于带有Kubernetes的SpringBootAdmin服务器的问题。
我有一个非常简单的SBA Server应用程序,如下所示
@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>
它在本地计算机上正常启动。 但是,当置于Kubernetes环境中时,它会产生:
ERROR [,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]
为什么请这些[null]?我确实使用过
spring.cloud.kubernetes.config.namespace=my-namespace
请问是什么问题?
谢谢
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)