Member-only story

Kubernetes Multi-Container Pod Design patterns

Ishan Liyanage
3 min readNov 28, 2020

--

The idea of the decoupling large monolithic application into micro services provides us the capability to develop set of independent, reusable components.

This will help to scale up/down as required and also we can modify each service based on different requirements instead of modifying one big application.

However there are cases where we need two services to work together such as application server and logging service (or logging agent).

In this case actually we do not need to build your application as one by merging two services as they cover different functions. We still can develop and build them separately and deploy together in one pod which will share the same life cycle.

Two Services bundled together which we can scale up and down as required.

This is why we have multi-container pod which share same life-cycle. In other words they create together, they destroy together. Also they share network space which means they can talk to each other as local host and same way they have access to same storage volumes.

You may remember the spec: section in the pods definition file is an array. That means we can add multiple container definitions there.

--

--

Ishan Liyanage
Ishan Liyanage

Written by Ishan Liyanage

Passionate Technical Lead, Senior Software Developer and free and open source software advocate. Based in Singapore.

No responses yet

Write a response