I trying to build a spring boot 3.2.2 app with spring cloud, but a faced this problem during the make of bootstrap.yml or application.yml, always getting Unknow property name for type org.springframework.cloud.kubernetes.coomons.ConfigMapConfigProperties.sources, but reading the docs over and over just showed me to add this dependencies:

<dependency>
 <groupId>org.springframework.cloud</groupId>
 <artifactId>spring-cloud-starter-kubernetes-fabric8</artifactId>
 </dependency>
 <dependency>
 <groupId>org.springframework.cloud</groupId>
 <artifactId>spring-cloud-starter-kubernetes-client</artifactId>
 </dependency>
 <dependency>
 <groupId>org.springframework.cloud</groupId>
 <artifactId>spring-cloud-starter-kubernetes-fabric8-config</artifactId>
 </dependency>
 <dependency>
 <groupId>org.springframework.cloud</groupId>
 <artifactId>spring-cloud-starter-kubernetes-client-config</artifactId>
 </dependency>

and configure my yml

   cloud:  
   kubernetes:  
       config:  
         enabled: true  
         name: spring-connector  
         sources:  
          - name: ${KUBE_CONFIG_MAP_NAME}  ```

but the error don't disapear.

interesting fact, during the compile this error don't appear, but even so my app don't load my configuration from configmap

Tried to remove the sources from yml but no effect, searched for more people who faced this issue but no clue about this.
I tried both application/bootstrap.yml, but no one worked for this.
0

There are 0 best solutions below