SpringBoot + Axon Framework + PostgreSQL + Confluent Kafka + Kubernetes

Hi guys, does anyone on the forum has a pom.xml with the configuration for running an SpringBoot application on kubernetes? I managed to run all the apps, but the applications are not registering correctly on kubernetes. This works before for when I was running using Eureka server, but I want to run on Kubernetes and it’s not working for me.

I’m also using the annotation @EnableDiscoveryClient on the main application class and these properties

...
axon.axonserver.enabled=false
axon.distributed.enabled=true
axon.distributed.spring-cloud.fallback-to-http-get=true
axon.distributed.spring-cloud.mode=rest
...

Any help would be helpful. !!! Thanks

I’m using this dependencies.

    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-kubernetes-fabric8</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-autoconfigure</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-validation</artifactId>
        </dependency>

        <dependency>
            <groupId>org.axonframework</groupId>
            <artifactId>axon-spring-boot-starter</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.axonframework</groupId>
                    <artifactId>axon-server-connector</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.axonframework.extensions.springcloud</groupId>
            <artifactId>axon-springcloud-spring-boot-starter</artifactId>
            <version>4.4</version>
        </dependency>
        <dependency>
        <dependency>
            <groupId>org.axonframework.extensions.kafka</groupId>
            <artifactId>axon-kafka-spring-boot-starter</artifactId>
            <version>4.0-RC3</version>
        </dependency>
        <dependency>
            <groupId>org.axonframework.extensions.tracing</groupId>
            <artifactId>axon-tracing-spring-boot-starter</artifactId>
            <version>4.5</version>
        </dependency>

        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka-clients</artifactId>
            <version>2.8.0</version>
        </dependency>

        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>42.2.23.jre7</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP</artifactId>
            <version>5.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.flywaydb</groupId>
            <artifactId>flyway-core</artifactId>
            <version>7.11.2</version>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.20</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.axonframework</groupId>
            <artifactId>axon-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>