Handle multiple pods #15322
Replies: 3 comments 1 reply
-
I think you are largely doing what I would do ... at least initially. One other recommendation would be to make sure the service of B & C can still start and not fail; but instead, be tolerant of the failure and keep trying to connect. |
Beta Was this translation helpful? Give feedback.
-
You could also take advantage of this feature of Systemd to setup a relationship between the Pods and use sd-notify to allow ther other pods to notify when the environment is ready to be used. @vrothberg WDYT? |
Beta Was this translation helpful? Give feedback.
-
This is a discussion, not an issue. Moving. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone, first of all introduce myself, my name is Victor, and although I knew for years the technology of containers, I had never worked with them in a professional way until now, I would like to thank all the developers / maintainers of Podman and all the tools that encompass it. You are a great team and since I met Podman about 6 months ago I am daily thinking about new ways to use this tool and apply them in my labs. I don't know if this should be put here or in the podman github as a help, I'm quite new to support comments or even github. If so I would appreciate if someone could take it to the correct site or tell me where it is.
Right now I have a very big doubt that doesn't let me move forward, I have to deploy in an automated way a set of pods all of them on the same machine. To simplify let's assume that I have 3 pods: pod A - Database, pod B - Intermediate Service, pod C - Web Server, between them there is a dependency in which pod B gives error if pod A has not started or ready at all, and the same with pod C and pod B. I have the possibility to add content to the images, to adapt them to our environments or add the necessary configurations, so this could also be an option.
I would like to know what would be the method that Podman's users would use, to deploy this in an automatic way and that would implement that a pod is not started until the previous one is not ready to receive work. Also how would you guys go about monitoring the containers in real time.
For the moment I have been following two paths: one using podman generate kube, applying liveness probe in a way surely not conventional or clean. My intention was then to join it with system units in order to follow the standard of modern linux and get the processes to start just by power on the computer. On the other hand it has been using podman generate systemd directly with podman commands. In both ways I added the order to follow between the units and their strong and weak dependencies. So yes, in both I got that starting the last pod using systemctl --user start, the rest were raised but they ignore the part of waiting for the rest, which caused inconsistencies and the final operation failed (I found that the second path was more organic and also allowed me to take those units to another pc and it worked the same way).
I don't know if I'm going right, or even if I should be using another path or software for it, for example infra-containers, but I don't know how, I have the thought that it should be oneself, that is, the container itself that says it is ready to continue, not the next one based on constantly asking the status. I think Kubernetes is intended for this thing, but as I say, all of this must be running on one machine only and I have never touched kubernetes beyond yaml files.
I've been looking for about two weeks for as much information as possible and reading what I could get my hands on, but I haven't found a way to automate a pod deployment in Podman, although I probably haven't hit on the necessary keywords.
Thank you very much for coming this far, I'm sure you will be of great help to me.
Beta Was this translation helpful? Give feedback.
All reactions