7 Extending applications with multi-container Pods
We met Pods in chapter 2, when you learned that you can run many containers in one Pod, but you didn't actually do it. In this chapter you're going to see how it works, and understand the patterns it enables. This is the first of the more advanced topics in this part of the book, but it's not a complicated subject - it just helps to have all the background knowledge from the previous chapters. Conceptually its quite simple: one Pod runs many containers, which is typically your app container plus some helper containers. It's what you can do with those helpers which makes this such an interesting feature.
Containers in a Pod share the same virtual environment, so when one container takes an action, other containers can see it and react to it - and they can even modify the intended action without the original container knowing. That lets you model your application so that the app container is very simple — it just focuses on its work and it has helpers which take care of integrating the app with other components and with the Kubernetes platform. It's a great way to add a consistent management API to all your apps, whether new or legacy.