O
O
Oleg Kolesnikov2020-10-28 18:30:50
Kubernetes
Oleg Kolesnikov, 2020-10-28 18:30:50

How to know if a pod in k8s is ready to use?

There is an application (go) that starts and extinguishes pods in k8s. Is there any way to determine if the application inside a Pod is ready to go, given the points below?

1. You cannot count on the status that is in k8s. After raising, the docker can take a long time to initialize. Until it is fully initialized, it cannot be said that it is ready to go. Based on this point, no one except himself knows when it can be used, and when not yet.
2. It is possible to make each application report this when it is ready, but I would not want to make all applications inside k8s dependent on the main application that manages them. I consider this option as the most extreme.

Given all of the above, is there any way to understand if the application is ready to use or not?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Shitskov, 2020-10-28
@DOC_tr

The most reliable way is Startup or Readiness probe
https://kubernetes.io/ru/docs/tasks/configure-pod-...

I
Ivan Shumov, 2020-10-28
@inoise

Integrate Consul there or another Service Discovery

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question