discovery.service-labels not works with spring-cloud-starter-kubernetes-client v2.0.1
See original GitHub issueDescribe the bug
spring.cloud.kubernetes.discovery.service-labels
is ignored with spring-cloud-starter-kubernetes-client v2.0.1, and ServiceInstance
metadata contains null key(null=8080
) if the k8s service/deployment doesn’t have named ports, which causes NPE from downstream like spring boot admin Tags
.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:10 (4 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If I switch from spring-cloud-starter-kubernetes-client to spring-cloud-starter-kubernetes-fabric8, the app works correctly. Does that mean that both issues might be bugs in spring-cloud-starter-kubernetes-client?
I think I’m running into the same issue with spring-cloud-starter-kubernetes-client v2.0.3
I have 3 services, and only 1 of them is labeled as “openapi-service”:
when I set service-labels to only select service with “openapi-service” label: ( or openapi-service=true, same effect )
The pod cannot start, with no ERROR information container log shows it’s applying a service without “openapi-service” label, twice:
And that’s the end of log, the container exists after that.