apiVersion: apps/v1
kind: Deployment
metadata:
  name: jenkins-deployment
  labels:
    app: jenkins
spec:
  replicas: 1
  selector:
    matchLabels:
      app: jenkins
  template:
    metadata:
      labels:
        app: jenkins
    spec:
      containers:
      - name: jenkins
        image: asafmeytal/my-jenkins
        ports:
        - containerPort: 8080
        volumeMounts:
        - name: docker-sock
          mountPath: '/var/run/docker.sock'
      volumes:
      - name: docker-sock
        hostPath:
          path: '/var/run/docker-sock'
          type: File
        