Kubernetes

Understanding Kubernetes Multi-Container Pod Patterns and Init- Containers

Multi-container pods are extremely useful for specific purposes in Kubernetes. While it’s not always necessary to combine multiple containers into a single pod, knowing the right patterns to adopt creates more robust Kubernetes deployments.

Pods will often only have one container — this is OK. One of the downsides of having a pod as an extra layer of abstraction around a container is that it seems like you should have multiple containers for a pod to be useful.

Another reason to combine containers into a single pod is fro simpler communication between containers in the pod. These containers can communicate through shared volumes (writing to a shared file or directory) and through inter-process communication (semaphores or shared memory).

There are three common design patterns and use-cases for combining multiple containers into a single pod. We’ll walk through the sidecar pattern, the adapter pattern, and the ambassador pattern. Look to the end of the post for example YAML files for each of these.

--

--

--

I am pursiing B-tech. and also very fond of learning new technology under the guidance of Vimal Daga sir (World Record Holder).

Love podcasts or audiobooks? Learn on the go with our new app.

Metrics @ Robinhood

Fantasy Service: The Great Cache Game — Part 1

Mautic & RabbitMQ Integration

Day 4/50 — Enter CSV and Discord.

Ontap volume move with Ansible

Keeping your medium content fresh in your 11ty website using Github Actions and Netlify

A Serverless way to serve more

How To Fix Slow Applications? Application Slowness Troubleshooting

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Vishugoyal

Vishugoyal

I am pursiing B-tech. and also very fond of learning new technology under the guidance of Vimal Daga sir (World Record Holder).

More from Medium

Kubernetes

Multi-Cloud Kubernetes Cluster

Kubernetes Capsule-1

KUBERNETES DEPLOYMENT