apiVersion: v1
kind: ReplicationController
metadata:
  namespace: demos
  name: update-demo-rc-v2
spec:
  replicas: 5
  selector:
    demo: update
    demo-version: v2
  template:
    metadata:
      labels:
        demo: update
        demo-version: v2
    spec:
      containers:
      - name: busybox
        image: busybox
        command:
        - sh
        - -c
        - while true; do echo "$(hostname) v2" > /data/index.html; sleep 60; done
        volumeMounts:
        - name: content
          mountPath: /data
      - name: nginx
        image: nginx
        volumeMounts:
          - name: content
            mountPath: /usr/share/nginx/html
            readOnly: true
      volumes:
      - name: content
