# How to create a scheduling node for multiple hosts but not all

**URL:** <https://forums.suse.com/t/how-to-create-a-scheduling-node-for-multiple-hosts-but-not-all/10645>\
**Category:** SUSE Rancher Prime\
**Created:** [June 3, 2018, 1:29pm UTC](https://forums.suse.com/t/how-to-create-a-scheduling-node-for-multiple-hosts-but-not-all/10645 "2018-06-03T13:29:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rwagner\_inf](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@rwagner\_inf](https://forums.suse.com/u/rwagner_inf)\
**Post date:** [June 3, 2018, 1:29pm UTC](https://forums.suse.com/t/how-to-create-a-scheduling-node-for-multiple-hosts-but-not-all/10645/1 "2018-06-03T13:29:45Z")

</div>

Hello, I’m new to rancher, sorry if I’m asking you something trivial, but I can not get a pod to run only on some hosts.

For example, I have a master1 host (with etcd and controlpane), and the hosts worker1 and worker2 (as workers).

I have the following scenario:

master1 - etcd and controlpane  
worker1 - worker  
worker3 - worker

I would like to run apache pods on more than one host but not at all, for example, only on the worker1 and worker3 hosts.

In the configuration of hosts labels there is the label “[kubernetes.io/hostname](http://kubernetes.io/hostname)”, so I used it in the deploy of the pod. But it does not work.

Here’s a print with everything settings. The “Deploy Workload” screen, the host labels settings screen, and the screen when I finish deploying.

 ![rancher](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/2/2d1b0a4ee0452c35a73a0e912ca5b71974956fbc.jpg)

Sorry for the image, but I can only post 1 imagen, so I compiled it.  
Could someone help me, what am I doing wrong? Thank you very much.

---

<div class="post-metadata">

**Author:** ![etlweather](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/etlweather/32/419_2.png) [@etlweather](https://forums.suse.com/u/etlweather)\
**Post date:** [June 3, 2018, 1:49pm UTC](https://forums.suse.com/t/how-to-create-a-scheduling-node-for-multiple-hosts-but-not-all/10645/2 "2018-06-03T13:49:28Z")

</div>

You can achieve this by using a node selector.

For example, on the nodes you can put a label like: `run-apache=true`

Then for the pods, you add a node selector (under the node scheduling section in the UI).

 ![node%20scheduling](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/0/04ee56f517440aba1dccdae9112caf9741cfe14e.png)
