skip to Main Content

We have to create Pod with single container which has to use the image redis + nginx + memcached. Then below are questions:

Is this possible?
if yes, how to create it,. Any way interactive or yaml based ? please share the yaml file if possible

2

Answers


  1. Is this possible?

    Not…really? A container boots from a single image. On the other hand, you can certainly create a single image that includes all of those services:

    • Using a multi-stage build you could combine content from multiple images, but you would be merging it into a single image.

    • You could just install them your on top of an Alpine base image.

    In either case, your pod would probably still have multiple containers.

    Login or Signup to reply.
  2. Kubernetes allows pods to have multiple containers running as sidecars, each running as an independent process but having the capability to work together. The different containers that form a pod are scheduled on the same VM.

    The ideal way to achieve what you need would be to have individual containers for Redis, Nginx and Memcached. These will then need to be scheduled as a pod.

    You can refer to this for basic understanding – https://kubernetes.io/docs/concepts/workloads/pods/#how-pods-manage-multiple-containers

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search