---
  apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: jenkins
  spec:
    selector:
      matchLabels:
        app: jenkins
    replicas: 1
    template:
      metadata:
        labels:
          app: jenkins
      spec:
        containers:
        - name: jenkins
          image: jenkins/jenkins:lts
          ports:
          - containerPort: 8080
          - containerPort: 50000
          volumeMounts:
            - name: jenkins-home
              mountPath: /var/jenkins_home
        volumes:
        - name: jenkins-home
          # emptyDir: {}
          persistentVolumeClaim:
            claimName: jenkins-claim
