Merge pull request #9640 from caesarxuchao/single-files-examples-v1
update the single files in examples/ to v1
This commit is contained in:
commit
38ec53dc1b
12
pod.yaml
12
pod.yaml
|
@ -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
|
|
|
@ -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
|
|
||||||
|
|
|
@ -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):
|
||||||
|
|
Loading…
Reference in New Issue