kubectl apply -f pgsql.yaml -f sonarqube.yaml
[root@node4 sonarqube]# kubectl get po -n devops
NAME READY STATUS RESTARTS AGE
postgres-sonar-f644b4fbd-qnvkn 0/1 Pending 0 34m
sonarqube-58669db48f-jq24g 0/1 Pending 0 34m
kubectl describe po postgres-sonar-f644b4fbd-qnvkn -n devops
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 14m (x2 over 14m) default-scheduler 0/3 nodes are available: 3 pod has unbound immediate PersistentVolumeClaims.
Warning FailedScheduling 19s (x14 over 13m) default-scheduler 0/3 nodes are available: 3 pod has unbound immediate PersistentVolumeClaims.
解决方案:
这个是pv pvc问题 如有需要,详情评论区留言 作者回复具体解决方案
文章描述了在Kubernetes环境中,使用kubectlapply部署postgres-sonar和sonarqube服务时遇到的问题,Pods处于Pending状态,原因是因为没有可用的PersistentVolumeClaims。默认调度器无法找到满足条件的节点进行调度。解决方案可能涉及配置PersistentVolume或调整PVC的绑定策略。
5162





