apiVersion: v1
kind: Service
metadata:
  name: typo3
  labels:
    app: typo3
spec:
  type: NodePort
  ports:
    - nodePort: 31021
      port: 80
      targetPort: 80
  selector:
    app: typo3
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: typo3
spec:
  selector:
    matchLabels:
      app: typo3
  replicas: 1
  template:
    metadata:
      labels:
        app: typo3
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: app
                operator: In
                values:
                - typo3
      containers:
      - image: image:typo3
        name: typo3
        imagePullPolicy: Never
        ports:
        - containerPort: 80
        volumeMounts:
         - name: my-volume
           mountPath: /var/www/html/
      volumes:
           - name: my-volume
             persistentVolumeClaim:
                 claimName: my-claim
