apiVersion: v1
kind: ReplicationController
metadata:
  name: my-nginx-1.0.1
spec:
  replicas: 3
  selector:
    run: my-nginx
    ver: 1.0.1
  template:
    metadata:
      labels:
        run: my-nginx
        ver: 1.0.1
    spec:
      containers:
      - name: my-nginx
        resources:
          limits:
            cpu: 600m
            memory: 300Mi
          requests:
            cpu: 200m
            memory: 100Mi
        image: nginx
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 80
#          hostPort: 80
          protocol: TCP
          name: nginx-port
        volumeMounts:
        - name: java
          mountPath: /opt/java
          readOnly: true
        env:
          - name: rc_nginx_ver
            value: 1.0.1
      volumes:
      - name: java
        hostPath:
          path: /root/jdk1.8.0_101
