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