Can you verify if the application link has got the hostname and the application name when doing the refresh. Because while doing a refresh in the localhost, it will just be springboot application locally, so there wont be any need for an additional path of application-name. Wherehas when you deploy to a server normally we have to give the path name of the application in addition to the hostname. In tomcat, the URL I use is as below,
http://<hostname>/**<application-name>**/actuator/refresh/
Normally when you hit this URL via postman, it will give you a 200 response with an empty body of []. And then, you should be able to see the below lines in the log files of the client application. [ Also I had the attribute @RefreshScope attribute at the main method of the application just below the @SpringBootApplication attribute to refresh the attributes of the application.]
INFO o.s.c.c.c.ConfigServicePropertySourceLocator.getRemoteEnvironment:249 - Fetching config from server at : http://<hostname>/<Config-server-application-name>/
INFO o.s.c.c.c.ConfigServicePropertySourceLocator.log:168 - Located environment: name=config-client, profiles=[development], label=null, version=ab36989c85922f1c9cf7803fac4, state=null
INFO o.s.c.b.c.PropertySourceBootstrapConfiguration.initialize:112 - Located property source: [BootstrapPropertySource {name='bootstrapProperties-configClient'}, BootstrapPropertySource {name='bootstrapProperties-https://<gitlaburl>/<companyname>/config-server.git/config-client-development.yml'}]
INFO o.s.boot.SpringApplication.logStartupProfileInfo:655 - The following profiles are active: development
INFO o.s.boot.SpringApplication.logStarted:61 - Started application in 1.557 seconds (JVM running for 70689.032)
For Kubernetes,
Try using
kubectl apply
(instead of kubectl create configmap.)
To deploy the config map, just run the following command on Kubernetes:
kubectl apply -f config-map.yml
Make sure the name of the config map matches the name of the spring boot application .Also see the below link ,
https://github.com/spring-cloud/spring-cloud-kubernetes/issues/255
Also there is a spring cloud kuberenetes which you can explore as below,
https://cloud.spring.io/spring-cloud-static/spring-cloud-kubernetes/2.0.0.M1/reference/html/#why-do-you-need-spring-cloud-kubernetes