---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: demo-app-web
  labels:
    app: demo-app-web
spec:
  replicas: 1
  selector:
    matchLabels:
      app: demo-app-web
  template:
    metadata:
      labels:
        app: demo-app-web
    spec:
      imagePullSecrets:
      - name: aly-shanghai
      containers:
      - name: demo-app-web
        image: registry.cn-shanghai.aliyuncs.com/ibizsys/demo-app-web:latest
        imagePullPolicy: Always
        ports:
        - containerPort: 8080
        volumeMounts:
        - name: data
          mountPath: /app/file
      volumes:      
      - name: data
        persistentVolumeClaim:
          claimName: demo-date-pvc-nfs

---
apiVersion: v1
kind: Service
metadata:
  name: demo-app-web
  labels:
    app: demo-app-web
spec:
  type: NodePort
  ports:
  - name: http
    port: 8080
    targetPort: 8080
    nodePort: 8080
    protocol: TCP
  selector:
    app: demo-app-web

