apiVersion: apps/v1
kind: Deployment
metadata:
  name: jenkins-master
  namespace: jenkins
  labels:
    app: jenkins-master
spec:
  replicas: 1
  selector:
    matchLabels:
      app: jenkins-master
  template:
    metadata:
      labels:
        app: jenkins-master
    spec:
      containers:
      - name: jenkins-master
        image: jenkins/jenkins:lts
        ports:
        - containerPort: 8080
        volumeMounts:
        - mountPath: "/var/jenkins_home"
          name: pvc-jenkins-master
      volumes:
      - name: pvc-jenkins-master
        persistentVolumeClaim:
          claimName: jenkins-master
