If your application is exposed over a secure SSL port, you should change two flags from the EurekaInstanceConfig—nonSecurePortEnabled to false and securePortEnabled to true. This forces Eureka to publish instance information that shows an explicit preference for secure communication. The Spring Cloud DiscoveryClient will always return a URL starting with HTTPS for a service that is configured this way, and the Eureka instance information will have a secure health check URL:
eureka: instance: nonSecurePortEnabled: false securePortEnabled: true securePort: ${PORT:8091} statusPageUrl: https://localhost:${eureka.instance.securePort}/info healthCheckUrl: https://localhost:${eureka.instance.securePort}/health homePageUrl: ...