Commit 46621b25 authored by Abhi Shah's avatar Abhi Shah

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

update the single files in examples/ to v1
parents 33cd4c40 5abf6ce7
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
\ No newline at end of file
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: ...@@ -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
...@@ -15,22 +15,18 @@ kubectl create -f pod.yaml ...@@ -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 ...@@ -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: ...@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment