apiVersion: v1
kind: Service
metadata:
  labels:
    app: ftps
  name: ftps
  annotations:
    metallb.universe.tf/address-pool: minikube
spec:
  ports:
  - name: data
    port: 20
  - name: ftps
    port: 21
    protocol: TCP
  - name: ftps-pasv20
    port: 30020
    protocol: TCP
  - name: ftps-pasv
    port: 30021
    protocol: TCP
  selector:
    app: ftps
  type: LoadBalancer
---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: ftps
  name: ftps
spec:
  replicas: 1
  selector:
    matchLabels:
      app: ftps
  template:
    metadata:
      labels:
        app: ftps
    spec:
      containers:
      - image: my_ftps
        resources:
          limits:
            memory: "128Mi"
            cpu: "50m"
        imagePullPolicy: Never
        name: ftps
        ports:
        - containerPort: 21
        - containerPort: 30020
        - containerPort: 30021
        volumeMounts:
          - mountPath: "/var/lib/mysql"
            name: mariadb-pv
          - mountPath: "/var/www/localhost/htdocs/"
            name: wp-pv
      volumes:
        - name: mariadb-pv
          persistentVolumeClaim:
            claimName: mariadb-pvc
        - name: wp-pv
          persistentVolumeClaim:
            claimName: wp-pvc