How to create a pod with a single container having multiple images

Hello,

Can we have a single container with multiple image like nginx + Redis + alpine ? Is this possible? if yes, how to create it,. Any way interactive or yaml based ? please share the yaml file if possible

BR,
Rameez

Hello, @ramizahmad746

Check this lecture:
https://www.udemy.com/course/certified-kubernetes-administrator-with-practice-tests/learn/lecture/15029472#questions/12913488

And try this lab:

Thanks @KodeKloud I did practiced this but my question is what if I need to create a single container inside a pod with 3-4 images like nginx + Redis + alpine?
Is this possible? if yes, how to create it?

In simple words, that’s not possible in k8s’s Pod.
You can achieve this from Dockerfile.
https://adilsoncarvalho.com/creating-multiple-images-from-a-single-dockerfile-3f69254b6137

Thanks @player001,if we create an image out of this Dockerfile and use that image to create a POD then I guess it will work,what do you think?

@ramizahmad746 yes it works but that is not multiple images, you use one image alpine and install nginx, redis via command.

Why would you like to do that?

How about creating it through Init Containers?