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