// Module included in the following assemblies:
//
// * applications/deployments/managing-deployment-processes.adoc

:_mod-docs-content-type: PROCEDURE
[id="deployments-assigning-pods-to-nodes_{context}"]
= Assigning pods to specific nodes

You can use node selectors in conjunction with labeled nodes to control pod
placement.

Cluster administrators can set the default node selector for a project in order
to restrict pod placement to specific nodes. As a developer, you can set a node
selector on a `Pod` configuration to restrict nodes even further.

.Procedure

. To add a node selector when creating a pod, edit the `Pod` configuration, and add
the `nodeSelector` value. This can be added to a single `Pod` configuration, or in
a `Pod` template:
+
[source,yaml]
----
apiVersion: v1
kind: Pod
metadata:
  name: my-pod
# ...
spec:
  nodeSelector:
    disktype: ssd
# ...
----
+
Pods created when the node selector is in place are assigned to nodes with the
specified labels. The labels specified here are used in conjunction with the
labels added by a cluster administrator.
+
For example, if a project has the `type=user-node` and `region=east` labels
added to a project by the cluster administrator, and you add the above
`disktype: ssd` label to a pod, the pod is only ever scheduled on nodes that
have all three labels.
+
[NOTE]
====
Labels can only be set to one value, so setting a node selector of `region=west`
in a `Pod` configuration that has `region=east` as the administrator-set default,
results in a pod that will never be scheduled.
====
