﻿# Selecting nodes for pod placement

> [HTML Version](node-selector.html)

You can restrict pod placement to specific nodes using the \[OBJECT\] parameter. This is a simple Kubernetes tool that allows you to assign pods only to nodes with certain labels.

Before configuring the \[OBJECT\] parameter, please read the [BRIX On-Premises advanced settings](advanced-kubernetes-settings.md) article to learn about all the pod placement tools and recommendations for using them together.

## How to configure the nodeSelector parameter 

For basic pod placement on nodes using the \[OBJECT\] parameter, follow the steps:

1. Add labels on the nodes.  
  
To place pods in specific Kubernetes cluster nodes, set labels for the desired nodes, e.g. \[OBJECT\].

2. Configure verification of label matching.  
  
In the pod manifest, specify a \[OBJECT\] parameter with the added labels. If a node does not have a matching label, the pod is not scheduled for that node.

Let's look at an example. Suppose there are two environments configured: **develop** and **production**. The load of the production environment is distributed on the \[OBJECT\] node, and the load of the develop environment is distributed on the \[OBJECT\] node. To do this:

1. Add environment labels to the nodes:

- \[OBJECT\] on \[OBJECT\].

- \[OBJECT\] on \[OBJECT\].

To do this, run the commands:

````
kubectl label nodes node-1 environment=production  
kubectl label nodes node-2 environment=development

2. ````
Specify the labels created for the pods so that they run in the correct nodes. In each environment, open the \[OBJECT\] file and set the value for the \[OBJECT\] parameter:

- for production environment:

````
global:  
  nodeSelector:  
    environment````
 

- for development environment:

````
global:  
  nodeSelector:  
    environment: develop

3. ````
Once the parameter is configured, apply it as described in the [Modify BRIX parameters](change-settings-enterprise.md#apply-new-parameters) article.

As a result:

1. All pods with the \[OBJECT\] configuration will run only on the nodes labeled \[OBJECT\].

2. All pods with the \[OBJECT\] configuration will only run on the nodes labeled \[OBJECT\].

### Default values for the nodeSelector parameter

By default, no values are set in the \[OBJECT\] field. Therefore, pods are allocated to any available nodes in the cluster without restriction.

