<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>nodeSelector on Shaowen Chen's Website</title><link>https://www.chenshaowen.com/en/tags/nodeselector/</link><description>Recent content in nodeSelector on Shaowen Chen's Website</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>&amp;copy;2016 - {year}, All Rights Reserved.</copyright><lastBuildDate>Mon, 27 Jun 2022 00:00:00 +0000</lastBuildDate><sy:updatePeriod>weekly</sy:updatePeriod><atom:link href="https://www.chenshaowen.com/en/tags/nodeselector/atom.xml" rel="self" type="application/rss+xml"/><item><title>How to Run a Pod on a Specified Node</title><link>https://www.chenshaowen.com/en/blog/how-to-set-up-pod-to-run-to-a-specified-node.html</link><pubDate>Mon, 27 Jun 2022 00:00:00 +0000</pubDate><atom:modified>Mon, 27 Jun 2022 00:00:00 +0000</atom:modified><guid>https://www.chenshaowen.com/en/blog/how-to-set-up-pod-to-run-to-a-specified-node.html</guid><description>1. Specify a Node via nodeSelector When Creating a Workload Add a label to the node 1 kubectl label node node2 project=A Create the workload with the specified nodeSelector 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 cat &amp;lt;&amp;lt;EOF | kubectl apply -f - apiVersion: apps/v1 kind: Deployment metadata: name: nginx-nodeselector spec: replicas: 1 selector: matchLabels: app: nginx-nodeselector template: metadata: labels: app: nginx-nodeselector spec: nodeSelector: project: A containers: - name: nginx image: nginx EOF Check the workload 1 2 3 4 kubectl get pod -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES nginx-nodeselector-7bb75b7687-7r5xk 1/1 Running 0 19s 10.</description><dc:creator>微信公众号</dc:creator><category>Pod</category><category>Kubernetes</category><category>Scheduling</category><category>Operations</category><category>nodeSelector</category><category>Learning</category></item></channel></rss>