Closed nzb15555196162 closed 1 day ago
it's not nacos' problem I think. you should check your application can read the init bootstrap configuration from k8s
it's not nacos' problem I think. you should check your application can read the init bootstrap configuration from k8s
I have shown 3 scenarios
the centos7 kubernetes application obtains the nacos configuration abnormally. The application starts abnormally, which leads to the application registration abnormally. However, the command line obtains the application configuration normally. See my screenshots
the centos7 kubernetes application removes the nacos configuration function. The application obtains the configuration from the configuration file. The application starts normally and registers nacos
the windows application obtains the nacos configuration normally, starts normally and registers to nacos Through my verification, the problem is a problem with centos kubernetes nacos. The problem lies in the application obtaining the nacos configuration.
From you description, I think it's your application problem. When you application deploy with k8s, it will not read configuration from nacos, but use local config, or when it get config during starting, the network is not well, and waiting the application end, the pod ready and network well.
I suggest you to see the nacos-client log ${user.home}/logs/nacos/config.log
to see whether get target config and whether with error.
From you description, I think it's your application problem. When you application deploy with k8s, it will not read configuration from nacos, but use local config, or when it get config during starting, the network is not well, and waiting the application end, the pod ready and network well.
I suggest you to see the nacos-client log
${user.home}/logs/nacos/config.log
to see whether get target config and whether with error. It should be closed now, because everything is ok with the new kubernetes cluster
Describe the bug In the kubernetes environment, the springboot application uses nacos as the configuration center and registration center exception Expected behavior In the kubernetes environment, the springboot application uses nacos as the configuration center and registration center ok
Actually behavior In the kubernetes environment, the springboot application uses nacos as the configuration center and registration center exception
How to Reproduce see my below screenshot in kubernetes: 1
2 when i remove nacos configuration in kubernetes
3 local start
![2](https://github.com/alibaba/nacos/assets/18350673/8ccc5078-656c-419f-b944-7ed2e2db6534)
Desktop (please complete the following information):
Additional context Add any other context about the problem here.