<p>I want to deploy pods in the same node in the EKS cluster.</p>
<p>for e.g if I deploy with the following command</p>
<p><code>kubectl apply -f &lt;deployment.yaml&gt;</code></p>
<p>is there a way to assign the deployments to a specific node?</p>

Hamza J
<p>Yes, you can use <code>nodeSelector</code> labels and pod <code>affinity</code></p>
<p>NodeSelector example</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: nginx
  labels:
    env: test
spec:
  containers:
  - name: nginx
    image: nginx
    imagePullPolicy: IfNotPresent
  nodeSelector:
    disktype: ssd
</code></pre>
<p>Pod affinity example:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: with-node-affinity
spec:
  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchExpressions:
          - key: kubernetes.io/e2e-az-name
            operator: In
            values:
            - e2e-az1
            - e2e-az2
</code></pre>
<p><a href="https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/" rel="nofollow noreferrer">Documentation</a></p>
