has anyone created a container with multiple images - for example nginx + redis
Are you asking about this question - “creating a single container app running in a pod with multiple images 2 (nginx,redis etc.). Pod can contain one till four images”.
@Mrudul Palvankar how does one do that? Its not the same as deploying a multi-container pod right?
Actually this requires creating a dockerfile + new image and this takes too much time. Additionally the student node will not have docker installed. So not sure how this could be solved in CKA.
I get a feeling that this question could be about init-container but I am not sure.
@Mumshad Mannambeth can you please help us for - “creating a single container app running in a pod with multiple images 2 (nginx,redis etc.). Pod can contain one till four images” Is this about multi-container pod or about a pod with init-containers.
yeah I was thinking Docker too was the only way but that is weird for a k8s question
Answer could be a simple multi container in same pod concept. Since app can only run on nginx. Redis could be a temp/sidecar container in same pod. Could be, i am completely wrong though. I am also interested on the mumshad answer as well.
Pradeep, yes you can create but keeping them separate containers is a good practice. You can use docker-compose.yml file to create them separately and expose the ports there. Dockerfile can be used to create in a single container.
go through topic 21 Demo-PODs with yaml if you are looking to create them in a pod in lieu of K8s
does anyone have a solution without using dockerfile?