this post was submitted on 15 Aug 2023
13 points (100.0% liked)

Kubernetes

903 readers
1 users here now

founded 1 year ago
MODERATORS
top 2 comments
sorted by: hot top controversial new old
[–] alienscience 5 points 1 year ago (1 children)

I found the most interesting bit was this at the end:

  • You can now specify a new RestartPolicy: Always configuration for an init container.
  • If you add that new config, you now have a sidecar container.
  • A sidecar container starts before all ordinary containers (because it's an init container), and—this is the big part—it now terminates after all the ordinary containers all terminate.
  • If for some reason your sidecar container dies while ordinary containers are running, it will be restarted automatically. (This is the "Always" bit.)
  • Finally, unlike with normal init containers that each wait in turn to complete before the next starts, the other init containers do not wait for sidecar containers to complete before starting. Which is good, because they're not going to complete until much later.
[–] Sheldan 1 points 1 year ago

Yeah, that sums it up nicely.