In my case, I'm using NFS volume mount for persistent data. So when you want try this code in your environment then you need some changes in PV,PVC section in my codes.
rm -rf k8s-jenkins
git clone https://github.com/SumonPaul18/k8s-jenkins.git
cd k8s-jenkins
kubectl apply -f jenkins-pod.yaml
kubectl get pod,pv,pvc
kubectl port-forward jenkins-pod 32000:8080 --address 0.0.0.0 &
kubectl delete pod jenkins-pod
kubectl delete pvc jenkins-nfs-pvc
kubectl delete pv jenkins-nfs-pv
ps -ef | grep port-forward | grep 32000 | awk '{print $2}'
kill -9 [PID]
rm -rf k8s-jenkins
git clone https://github.com/SumonPaul18/k8s-jenkins.git
cd k8s-jenkins/k8s-jenkins-deploy
kubectl apply -f .
kubectl get deploy,pod,svc,pv,pvc -n jenkins
kubectl logs Pod-name
kubectl logs jenkins-deploy-7b59c686b8-5l4sk
kubectl delete ns jenkins
kubectl delete pvc jenkins-nfs-pvc
kubectl delete pv jenkins-nfs-pv