Kubernetes with hybrid containers on one VM?

I have played around a little bit with docker and kubernetes. Need some advice here on - Is it a good idea to have one POD on a VM with all these deployed in multiple (hybrid) containers?

This is our POC plan - 1. Customers to access (nginx reverse proxy) with a public API endpoint. eg., abc.xyz.com or def.xyz.com 2. List of containers that we need - Identity server Connected to SQL server - Our API server with Hangfire. Connected to SQL server - The API server that connects to Redis Server - The Redis in turn has 3 agents with Hangfire load-balanced (future scalable)

  1. Setup 1 or 2 VMs?
  2. Combination of Windows and Linux Containers, is that advisable?
  3. How many Pods per VM? How many containers per Pod?
  4. Should we attach volumes for DB?

Thank you for your help

  1. Setup 1 or 2 VMs?

You can do what you are looking for with 1 or 2 Vms but it would depend on how you want to have your setup configured in terms of availability and seperation.

If you need HA then you would be looking at having at minimum 3 Nodes for the control plane. You can do that in a couple different way either as a stack (with all kube components) or break it out, 3 nodes for the control plane and 3 nodes for the workers. The second method offers more separation as it keeps the worker pods away from the control plane.

  1. Combination of Windows and Linux Containers, is that advisable?

I would stick to linux for now. Windows support is still in beta last I checked

  1. How many Pods per VM? How many containers per Pod?

You’re only limited to the resources the pods are consuming and the hard limit of 110 pods per node. Containers per pod would depend on how you want to structure things.

  1. Should we attach volumes for DB?

If persistence is a must then you’ll be looking at persistent drives or using a Database as a service platform.

Thank you for your response. Really appreciate your help. For the first round, we are not worrying too much about HA. But, that would be our next phase.
We are a Microsoft shop and the company wants to use Windows :frowning: So, we were thinking of having a combination. For eg., the Redis could be on Linux. So, I wasn’t sure if hybrid was a possibility.
Thank you

Sorry I didn’t address the hybrid part. You can do hybrid, the master would need to be Linux and I think you’d need to use flannel as the network provider. If you’re doing a PoC first you can give it a go and see how it works.

Here’s a good place to start.


Awesome! when I first played around, I did use flannel with ubuntu nodes (https://www.howtoforge.com/tutorial/how-to-install-kubernetes-on-ubuntu/) but, didn’t try the hybrid.
Thank you for the links.

Hope it works, good luck :slight_smile: