In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces how to solve the problem of service startup failure caused by the failure of pulling configuration center data in the integrated istio in kubernetes. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.
Since grpc is used in K8s, here we integrate istio to achieve automatic discovery of http2 and load balancing. However, with the increase of nodes, the length of synchronization configuration before istio leads to the first startup, but istio does not initialize the relevant configuration when the service starts and pulls the configuration, which leads to the failure of the first startup. The error is as follows.
Let the service pause for 5s before loading the configuration information
Failed to load configuration and kept retrying until it was successful
Modify the start-up interval between istio and business pod
Modify dockerfile to check whether the istio is started, and then start the business pod after starting successfully.
After evaluation, plan 1 needs code intrusion, but still can not completely solve the problem, scheme 2 also needs to modify the business code, many businesses have to follow the modification, change the big plan 3 in the latest version of K8s has this function, upgrade risky scheme 4 intrusive small final choice 4, also refer to the relevant information https://github.com/istio/istio/issues/16222
In the end, you need to modify the dockerfile to solve the problem, and change the istio health check to check whether the configuration center is available.
ENTRYPOINT ["/ bin/sh", "- c"] CMD ["until curl-- head 'http://config-center/info'; do echo Waiting for Sidecar; sleep 3; done; echo Sidecar available; java-Xmx3200m-Xms3200m-Xmn1600m-jar / app.jar-- spring.profiles.active=prod"]
The print message at startup is as follows
Here you can see that the first detection is also a failure, and the business POD will not be started until it is successful.
Of course, you can also write the relevant commands to the yml of deploy.
This is the end of how to solve the problem of service startup failure caused by the failure of pulling configuration center data in the integrated istio in kubernetes. I hope the above content can be helpful to you and learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 287
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.