The adapter design pattern
As its name suggests, it's going to adapt an entry from a source format to a target format.
As with the ambassador and sidecar design patterns, this one expects that you run at least two containers:
- The first one is the main container.
- The second one is the adapter container.
This design pattern is helpful and should be used whenever the main containers emit data in a format, A, that should be sent to another application that is expecting the data in another format, B. As the name suggests, the adapter container is here to adapt.
Again, this design pattern is especially well-suited for log or monitoring management. Imagine a Kubernetes cluster where you have dozens of applications running; they are writing logs in Apache format that you need to convert into JSON so that they can be indexed by a search engine. This is exactly where the adapter design pattern comes into play. Running an adapter container next to the application containers will help you...