Merge pull request #9640 from caesarxuchao/single-files-examples-v1

update the single files in examples/ to v1
This commit is contained in:
Abhi Shah 2015-06-11 15:07:31 -07:00
commit 38ec53dc1b
3 changed files with 14 additions and 30 deletions

View File

@ -1,16 +1,12 @@
apiVersion: v1beta3 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
name: nginx
labels: labels:
name: nginx name: nginx
name: nginx
namespace: default
spec: spec:
containers: containers:
- image: nginx - name: nginx
imagePullPolicy: IfNotPresent image: nginx
name: nginx
ports: ports:
- containerPort: 80 - containerPort: 80
protocol: TCP
restartPolicy: Always

View File

@ -1,8 +1,7 @@
apiVersion: v1beta3 apiVersion: v1
kind: ReplicationController kind: ReplicationController
metadata: metadata:
name: nginx name: nginx
namespace: default
spec: spec:
replicas: 3 replicas: 3
selector: selector:
@ -14,10 +13,7 @@ spec:
app: nginx app: nginx
spec: spec:
containers: containers:
- image: nginx - name: nginx
imagePullPolicy: IfNotPresent image: nginx
name: nginx
ports: ports:
- containerPort: 80 - containerPort: 80
protocol: TCP
restartPolicy: Always

View File

@ -15,22 +15,18 @@ kubectl create -f pod.yaml
Where pod.yaml contains something like: Where pod.yaml contains something like:
```yaml ```yaml
apiVersion: v1beta3 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
name: nginx
labels: labels:
app: nginx app: nginx
name: nginx
namespace: default
spec: spec:
containers: containers:
- image: nginx - name: nginx
imagePullPolicy: IfNotPresent image: nginx
name: nginx
ports: ports:
- containerPort: 80 - containerPort: 80
protocol: TCP
restartPolicy: Always
``` ```
You can see your cluster's pods: You can see your cluster's pods:
@ -58,11 +54,10 @@ kubectl create -f replication.yaml
Where ```replication.yaml``` contains: Where ```replication.yaml``` contains:
```yaml ```yaml
apiVersion: v1beta3 apiVersion: v1
kind: ReplicationController kind: ReplicationController
metadata: metadata:
name: nginx name: nginx
namespace: default
spec: spec:
replicas: 3 replicas: 3
selector: selector:
@ -74,13 +69,10 @@ spec:
app: nginx app: nginx
spec: spec:
containers: containers:
- image: nginx - name: nginx
imagePullPolicy: IfNotPresent image: nginx
name: nginx
ports: ports:
- containerPort: 80 - containerPort: 80
protocol: TCP
restartPolicy: Always
``` ```
To delete the replication controller (and the pods it created): To delete the replication controller (and the pods it created):