Bootstrap

完整化安装kubesphere,ks-jenkins的状态一直为init

错误描述:

打印日志:

kubectl describe pod ks-jenkins-7fcff7857b-gh4g5 -n kubesphere-devops-system

日志描述如下:

 

Events:
  Type     Reason       Age                From                Message
  ----     ------       ----               ----                -------
  Normal   Scheduled    5m56s              default-scheduler   Successfully assigned kubesphere-devops-system/ks-jenkins-7fcff7857b-gh4g5 to k8s-node2
  Warning  FailedMount  3m53s              kubelet, k8s-node2  Unable to attach or mount volumes: unmounted volumes=[jenkins-home], unattached volumes=[jenkins-home jenkins-config plugin-dir secrets-dir ks-jenkins-token-dwvv5 casc-config]: timed out waiting for the condition
  Warning  FailedMount  95s                kubelet, k8s-node2  Unable to attach or mount volumes: unmounted volumes=[jenkins-home], unattached volumes=[jenkins-config plugin-dir secrets-dir ks-jenkins-token-dwvv5 casc-config jenkins-home]: timed out waiting for the condition
  Warning  FailedMount  4s (x3 over 4m8s)  kubelet, k8s-node2  MountVolume.NewMounter initialization failed for volume "pvc-3b0a8158-60d4-4b09-9a61-199207575e67" : path "/var/openebs/local/pvc-3b0a8158-60d4-4b09-9a61-199207575e67" does not exist

解决

日志我是在节点 k8s-node1打印的,根据日志描述去到了 k8s-node2 看看/var/openebs/local/pvc-3b0a8158-60d4-4b09-9a61-199207575e67这个目录是否存在,发现/var/openebs/local目录下没有pvc-3b0a8158-60d4-4b09-9a61-199207575e67这个目录,那就创建一个

sudo mkdir -p /var/openebs/local/pvc-3b0a8158-60d4-4b09-9a61-199207575e67
sudo chmod 755 /var/openebs/local/pvc-3b0a8158-60d4-4b09-9a61-199207575e67

回到主节点再次查看状况,已经正常了

 

;