# Kubernetes with hybrid containers on one VM?

**URL:** <https://discuss.kubernetes.io/t/kubernetes-with-hybrid-containers-on-one-vm/5348>\
**Category:** General Discussions\
**Created:** [March 7, 2019, 4:12pm UTC](https://discuss.kubernetes.io/t/kubernetes-with-hybrid-containers-on-one-vm/5348 "2019-03-07T16:12:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jo\_Krish](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/jo_krish/32/2303_2.png) [@Jo\_Krish](https://discuss.kubernetes.io/u/Jo_Krish)\
**Post date:** [March 7, 2019, 4:12pm UTC](https://discuss.kubernetes.io/t/kubernetes-with-hybrid-containers-on-one-vm/5348/1 "2019-03-07T16:12:51Z")

</div>

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](http://abc.xyz.com) or [def.xyz.com](http://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

---

<div class="post-metadata">

**Author:** ![macintoshprime](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/macintoshprime/32/7121_2.png) [@macintoshprime](https://discuss.kubernetes.io/u/macintoshprime)\
**Post date:** [March 8, 2019, 1:39pm UTC](https://discuss.kubernetes.io/t/kubernetes-with-hybrid-containers-on-one-vm/5348/2 "2019-03-08T13:39:29Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![Jo\_Krish](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/jo_krish/32/2303_2.png) [@Jo\_Krish](https://discuss.kubernetes.io/u/Jo_Krish)\
**Post date:** [March 8, 2019, 4:24pm UTC](https://discuss.kubernetes.io/t/kubernetes-with-hybrid-containers-on-one-vm/5348/3 "2019-03-08T16:24:28Z")

</div>

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 ☹ 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

---

<div class="post-metadata">

**Author:** ![macintoshprime](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/macintoshprime/32/7121_2.png) [@macintoshprime](https://discuss.kubernetes.io/u/macintoshprime)\
**Post date:** [March 8, 2019, 4:38pm UTC](https://discuss.kubernetes.io/t/kubernetes-with-hybrid-containers-on-one-vm/5348/4 "2019-03-08T16:38:49Z")

</div>

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.

> **[Using Windows Server Containers in Kubernetes](https://kubernetes.io/docs/getting-started-guides/windows/)**
>
> Note: These instructions were recently updated based on Windows Server platform enhancements and the Kubernetes v1.9 release Kubernetes version 1.5 introduced Alpha support for Windows Server Containers based on the Windows Server 2016 operating...

  

> **[Kubernetes on Windows](https://docs.microsoft.com/en-us/virtualization/windowscontainers/kubernetes/getting-started-kubernetes-windows)**
>
> Joining a Windows node to a Kubernetes cluster with v1.13.

---

<div class="post-metadata">

**Author:** ![Jo\_Krish](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/jo_krish/32/2303_2.png) [@Jo\_Krish](https://discuss.kubernetes.io/u/Jo_Krish)\
**Post date:** [March 8, 2019, 5:19pm UTC](https://discuss.kubernetes.io/t/kubernetes-with-hybrid-containers-on-one-vm/5348/5 "2019-03-08T17:19:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![macintoshprime](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/macintoshprime/32/7121_2.png) [@macintoshprime](https://discuss.kubernetes.io/u/macintoshprime)\
**Post date:** [March 8, 2019, 5:32pm UTC](https://discuss.kubernetes.io/t/kubernetes-with-hybrid-containers-on-one-vm/5348/6 "2019-03-08T17:32:08Z")

</div>

Hope it works, good luck 🙂
