# Mixed Linux/Windows workers?

**URL:** <https://forums.suse.com/t/mixed-linux-windows-workers/15699>\
**Category:** SUSE Rancher Prime\
**Created:** [October 31, 2019, 7:41am UTC](https://forums.suse.com/t/mixed-linux-windows-workers/15699 "2019-10-31T07:41:39Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![divemaster](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/divemaster/32/4463_2.png) [@divemaster](https://forums.suse.com/u/divemaster)\
**Post date:** [October 31, 2019, 7:41am UTC](https://forums.suse.com/t/mixed-linux-windows-workers/15699/1 "2019-10-31T07:41:39Z")

</div>

In May 2019, I saw a demo of Rancher 2.3 Beta at [rancher.com](http://rancher.com). There a Linux/Windows Mixed Cluster was installed and working. Now I’m trying to rebuild the Final 2.3.2 for an important project. Unfortunately the Linux-Worker-Nodes are locked with “[cattle.io/os=linux:NoSchedule](http://cattle.io/os=linux:NoSchedule)” for the Container-Deploymend. Is it possible to set up a mixed cluster with Rancher 2.3.x? So it was shown in the [Rancher.com](http://Rancher.com) advertisement! Or is there a trick for the configuration?

THX  
Tino Brandt

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [October 31, 2019, 7:58am UTC](https://forums.suse.com/t/mixed-linux-windows-workers/15699/2 "2019-10-31T07:58:56Z")

</div>

The early betas did allow mixing worker nodes, but there were various issues with that so what shipped in 2.3.0 does not support mixing. Linux nodes in a Windows cluster are only meant for running system services.

---

<div class="post-metadata">

**Author:** ![divemaster](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/divemaster/32/4463_2.png) [@divemaster](https://forums.suse.com/u/divemaster)\
**Post date:** [October 31, 2019, 8:02am UTC](https://forums.suse.com/t/mixed-linux-windows-workers/15699/3 "2019-10-31T08:02:00Z")

</div>

Thanks for the quick reply 🙂  
Is there a plan that you can use the mixed mode at any time?

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [October 31, 2019, 8:07am UTC](https://forums.suse.com/t/mixed-linux-windows-workers/15699/4 "2019-10-31T08:07:30Z")

</div>

It’s not exactly my area but not that I’m aware of. The most basic problem is just trying to do simple `kubectl apply` deployments no longer works because everything has to have a scheduling rule or toleration to select only the right OS for the thing you want to run.

---

<div class="post-metadata">

**Author:** ![divemaster](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/divemaster/32/4463_2.png) [@divemaster](https://forums.suse.com/u/divemaster)\
**Post date:** [October 31, 2019, 8:19am UTC](https://forums.suse.com/t/mixed-linux-windows-workers/15699/5 "2019-10-31T08:19:12Z")

</div>

Thank you, I understand 🙂  
My problem is that I’m working on a project where I need Linux and Windows containers. In these containers are services that need to communicate between Linux- and Windows-Services. If the Linux containers are in one cluster and the Windows containers are in the other cluster, then I have a no idea about communication. I think windows is very limited with the network communication!  
Do you know a description (Link) of how to solve the problem?  
THX

---

<div class="post-metadata">

**Author:** ![jwr](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/jwr/32/5930_2.png) [@jwr](https://forums.suse.com/u/jwr)\
**Post date:** [December 24, 2019, 1:36pm UTC](https://forums.suse.com/t/mixed-linux-windows-workers/15699/6 "2019-12-24T13:36:55Z")

</div>

Hi Vincent,

is it possible to have the prefered node selector to Linux instead of Windows so to remove the taint of [cattle.io/os=linux](http://cattle.io/os=linux) and add the taint to the Windows nodes [cattle.io/os=windows](http://cattle.io/os=windows) ?

Because most of the Apps like Longhorn are only available for linux nodes. And the only Windows stuff that needs to run on our Kubernetes cluster is our own software so we can set a taint tolerance on that one 🙂

With kind regards,  
JW

---

<div class="post-metadata">

**Author:** ![Momo](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/momo/32/5942_2.png) [@Momo](https://forums.suse.com/u/Momo)\
**Post date:** [January 30, 2020, 3:49pm UTC](https://forums.suse.com/t/mixed-linux-windows-workers/15699/7 "2020-01-30T15:49:16Z")

</div>

I also need that for having Jenkins agent on linux and windows. The application will run on windows node which should not be the case. It cannot create the application due to some port mapping. It should be executed on linux nodes and best on master node.

---

<div class="post-metadata">

**Author:** ![chuchynz](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/chuchynz/32/6315_2.png) [@chuchynz](https://forums.suse.com/u/chuchynz)\
**Post date:** [February 4, 2020, 4:34pm UTC](https://forums.suse.com/t/mixed-linux-windows-workers/15699/8 "2020-02-04T16:34:16Z")

</div>

Has there been any progress / decision with this option? The recommendation from Kubernetes is to taint Windows nodes rather than both - [https://kubernetes.io/docs/setup/production-environment/windows/user-guide-windows-containers/#ensuring-os-specific-workloads-land-on-the-appropriate-container-host](https://kubernetes.io/docs/setup/production-environment/windows/user-guide-windows-containers/#ensuring-os-specific-workloads-land-on-the-appropriate-container-host). The overhead to tolerate both for Linux and Windows seems a little over engineered.

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [February 4, 2020, 4:52pm UTC](https://forums.suse.com/t/mixed-linux-windows-workers/15699/9 "2020-02-04T16:52:54Z")

</div>

The Linux machines in a Windows cluster are required to run etcd and various other system services (for which no Windows build exists). Otherwise from the user perspective we treat it as a “Windows-only” cluster.

You can override it if you want but we do not encourage mixing in Linux workloads in a Windows cluster, so the configuration reflects that.

---

<div class="post-metadata">

**Author:** ![chuchynz](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/chuchynz/32/6315_2.png) [@chuchynz](https://forums.suse.com/u/chuchynz)\
**Post date:** [February 5, 2020, 7:11am UTC](https://forums.suse.com/t/mixed-linux-windows-workers/15699/10 "2020-02-05T07:11:59Z")

</div>

> [@vincent](#):
>
> ou can override it if you want but we do not encourage mixing in Linux workloads in a Windows cluster, so the configuration reflects that.

Thanks for the extra info. Our goal is to use mixed node clusters. Is there any specifics you can share as to why Rancher does not recommend this? From Kubernetes’ perspective it does not sound like this approach is not recommended.

The simplest approach still sounds like to taint Windows nodes only so all Linux system services stay on Linux and that way you only need to tolerate explicitly for Windows.

Thanks for the responses on this.

---

<div class="post-metadata">

**Author:** ![lippertmarkus](https://avatars.discourse-cdn.com/v4/letter/l/ea666f/32.png) [@lippertmarkus](https://forums.suse.com/u/lippertmarkus)\
**Post date:** [July 10, 2020, 8:08am UTC](https://forums.suse.com/t/mixed-linux-windows-workers/15699/11 "2020-07-10T08:08:43Z")

</div>

More and more people start to try out Windows Containers with Kubernetes. As the process of adding Windows nodes following [the Kubernetes docs](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes/) is still very manual and tedious, Rancher could make a great difference here in my opinion.

There are a lot of benefits with running mixed workloads and as Windows Containers are still a niche, users almost always need some Linux workloads in their cluster because most of the existing applications like databases etc. are only available for Linux.

I think that making it hard for Rancher users due to the need to add tolerations to all those Linux workload, people will try to find alternatives although Rancher could be a superior solution.

---

<div class="post-metadata">

**Author:** ![khatrig](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@khatrig](https://forums.suse.com/u/khatrig)\
**Post date:** [July 21, 2020, 8:22pm UTC](https://forums.suse.com/t/mixed-linux-windows-workers/15699/12 "2020-07-21T20:22:27Z")

</div>

There is a tremendous potential for heterogeneous workloads on the same cluster. Though Rancher is a very attractive choice for cluster management but is hard to choose when it comes to mixed workloads. In my particular use case, having a separate windows cluster is not an option as it requires modifying all Linux workloads and keep adding annoying toleration conditions.

---

<div class="post-metadata">

**Author:** ![Rafael\_Batiati](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/rafael_batiati/32/6347_2.png) [@Rafael\_Batiati](https://forums.suse.com/u/Rafael_Batiati)\
**Post date:** [October 1, 2020, 5:13pm UTC](https://forums.suse.com/t/mixed-linux-windows-workers/15699/13 "2020-10-01T17:13:30Z")

</div>

Actually, it’s already possible to add windows nodes on a regular linux cluster and configure taints as you like.

Just create a Linux cluster using flannel network, or use the GUI to create a Windows cluster but editing the yaml before applying it:

Flannel network options

```auto
  network:
    mtu: 0
    options:
      flannel_backend_port: '4789'
      flannel_backend_type: vxlan
      flannel_backend_vni: '4096'
    plugin: flannel

```

Set “windows prefered” as false

```auto
windows_prefered_cluster: false

```

Be aware that you won’t get any GUI support to add Windows nodes on this cluster.  
You just have to replace the url, token and checksum on the standard join command line and run it on `CMD`

```auto
PowerShell -NoLogo -NonInteractive -Command "& {docker run -v c:\:c:\host rancher/rancher-agent:v2.4.8 bootstrap --server https://<<URL>> --token <<TOKEN>> --ca-checksum <<CHECKSUM>> --worker | iex}"

```

Don’t forget to add taints to all Windows nodes.

---

<div class="post-metadata">

**Author:** ![rdejong](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@rdejong](https://forums.suse.com/u/rdejong)\
**Post date:** [March 12, 2021, 10:34am UTC](https://forums.suse.com/t/mixed-linux-windows-workers/15699/14 "2021-03-12T10:34:18Z")

</div>

Hi, not sure if this is the most recent information regarding this topic?

It seems adding both Linux and Windows worker nodes in one cluster leads to taints being defined on the OS. While taints are a perfect way to pass hints to the scheduler, in fact a label would be sufficient. Each Helm chart should use a selector to make sure it gets scheduled on Linux. I consider it bad practice to enforce all helm chart builders to include tolerations for a taint on OS as well.

Is anyone working on this topic?
