2015-06-10 20:25:54 +00:00
|
|
|
apiVersion: v1
|
2014-10-21 05:44:14 +00:00
|
|
|
kind: ReplicationController
|
2015-05-08 00:55:36 +00:00
|
|
|
metadata:
|
|
|
|
name: nginx-controller
|
|
|
|
spec:
|
2014-10-21 05:44:14 +00:00
|
|
|
replicas: 2
|
2015-07-20 22:46:20 +00:00
|
|
|
# selector identifies the set of Pods that this
|
2015-06-16 21:48:51 +00:00
|
|
|
# replication controller is responsible for managing
|
2015-05-08 00:55:36 +00:00
|
|
|
selector:
|
2015-07-20 22:46:20 +00:00
|
|
|
app: nginx
|
|
|
|
# podTemplate defines the 'cookie cutter' used for creating
|
2014-10-21 05:44:14 +00:00
|
|
|
# new pods when necessary
|
2015-05-08 00:55:36 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
# Important: these labels need to match the selector above
|
|
|
|
# The api server enforces this constraint.
|
2015-07-20 22:46:20 +00:00
|
|
|
app: nginx
|
2015-05-08 00:55:36 +00:00
|
|
|
spec:
|
|
|
|
containers:
|
2015-07-20 22:46:20 +00:00
|
|
|
- name: nginx
|
|
|
|
image: nginx
|
|
|
|
ports:
|
|
|
|
- containerPort: 80
|