apiVersion: v1beta3 kind: ReplicationController metadata: name: nginx-controller spec: replicas: 2 # selector identifies the set of Pods that this # replicaController is responsible for managing selector: name: nginx # podTemplate defines the 'cookie cutter' used for creating # new pods when necessary template: metadata: labels: # Important: these labels need to match the selector above # The api server enforces this constraint. name: nginx spec: containers: - name: nginx image: dockerfile/nginx ports: - containerPort: 80