#apiVersion: extensions/v1beta1
apiVersion: v1
#kind: Deployment
kind: ReplicationController
metadata:
  name: my-nginx
spec:
  replicas: 3
  template:
    metadata:
      labels:
        run: my-nginx
    spec:
      containers:
      - name: my-nginx
        resources:
          limits:
            cpu: 600m
            memory: 300Mi
          requests:
            cpu: 200m
            memory: 100Mi
        image: test2.shenmin.com:5000/alvin-nginx:1.0.2
        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

#---
#apiVersion: v1
#kind: Service
#metadata:
#  name: my-nginx
#  labels:
#    run: my-nginx
#spec:
#  type: NodePort
#  ports:
#  - port: 80
#    targetPort: 80
#    nodePort: 30080
#    protocol: TCP
#  selector:
#    run: my-nginx
