https://rancher.com/ logo
Title
g

gifted-branch-26934

10/10/2022, 12:12 PM
hello guys, i have an app deployed in k8s with 2 replicas, the problem is each time i increase the number of replicas, the new replica is directly marked as available and operating. but the real thing that is happening that at the startup it builds a model that takes about 5 mins. for this issue i want the traffic to be routed to the first replica that has been operating for long time, and once the new replica builds the model, then i need to make it receive traffic as well. any idea how to do that?
g

gifted-branch-26934

10/10/2022, 12:23 PM
thanks a lot, how i missed that...
a

agreeable-oil-87482

10/10/2022, 12:25 PM
No worries, I assume there's some kind of check/service you can probe to determine if it's ready to accept traffic?
g

gifted-branch-26934

10/10/2022, 12:30 PM
yeah sure
am using a startup probe with initial delay 1000 seconds. testing it
it didnt work as it seemed that the first request to the application builds the model, nothing happens at the startup...
ill ask the dev to run the build model request at startup