3

spring-boot-istio:能自动在k8s上创建Istio资源的SpringBoot库

 1 year ago
source link: https://www.jdon.com/67093.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

spring-boot-istio:能自动在k8s上创建Istio资源的SpringBoot库

这个Spring Boot Istio库是专门为Spring Boot应用准备的。一旦这个库被加入你的应用并启用,它就会根据代码和注解字段@EnableIstio在当前Kubernetes集群上创建Istio资源。

Maven:

<dependency>
  <groupId>com.github.piomin</groupId>
  <artifactId>istio-spring-boot-starter</artifactId>
  <version>0.2.0</version>
</dependency>

该库为在Kubernetes上创建基于注解@EnableIstio的Istio资源提供自动配置的支持。

@SpringBootApplication
@EnableIstio(version = "v1", retries = 3, timeout = 3)
public class CallmeApplication {

    public static void main(String[] args) {
        SpringApplication.run(CallmeApplication.class, args);
    }
    
}

原理:
当这个Spring Boot Istio库被包含在你的应用程序中时,它使用Java Istio客户端与Istod通信。

在应用程序启动期间,该库与Istio API进行通信,以便创建DestinationRule和VirtualService对象。

点击标题



About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK