Merge pull request #7872 from caesarxuchao/nodeselector-example

update node-selector example to API v1beta3
This commit is contained in:
Wojciech Tyczynski 2015-05-07 10:09:03 +02:00
commit 0f7ef8ecab
2 changed files with 34 additions and 24 deletions

View File

@ -23,36 +23,33 @@ You can verify that it worked by re-running `kubectl get nodes` and checking tha
Take whatever pod config file you want to run, and add a nodeSelector section to it, like this. For example, if this is my pod config:
<pre>
apiVersion: v1beta1
desiredState:
manifest:
apiVersion: v1beta3
kind: Pod
metadata:
labels:
env: test
name: nginx
spec:
containers:
- image: nginx
name: nginx
id: nginx
version: v1beta1
id: nginx
kind: Pod
labels:
env: test
</pre>
Then add a nodeSelector like so:
<pre>
apiVersion: v1beta1
desiredState:
manifest:
apiVersion: v1beta3
kind: Pod
metadata:
labels:
env: test
name: nginx
spec:
containers:
- image: nginx
imagePullPolicy: IfNotPresent
name: nginx
id: nginx
version: v1beta1
id: nginx
kind: Pod
labels:
env: test
<b>nodeSelector:
<b>nodeSelector:
disktype: ssd</b>
</pre>

View File

@ -0,0 +1,13 @@
apiVersion: v1beta3
kind: Pod
metadata:
labels:
env: test
name: nginx
spec:
containers:
- image: nginx
imagePullPolicy: IfNotPresent
name: nginx
nodeSelector:
disktype: ssd