kubectl exec -n devops <jenkins-pod-name> -c jenkins -- ls /var/jenkins_home/plugins
# 检查某个具体插件是否存在 kubectl exec -n devops <jenkins-pod-name> -c jenkins -- \ find /var/jenkins_home/plugins -name "*git*"
宿主机 / 外部持久化位置: 该文件夹挂载在 PVC 的容量持久卷上(此例中使用 nfs-client 存储),因此具体路径需要结合实际的 PV(卷资源的 Capacity Prebond Area Capacitor 描述见)
-
确认 PVC 和 PV 名称:
kubectl get pvc -n devops kubectl describe pvc data-jenkins-0 -n devops