在Kubernetes中用Helm安装Prometheus为什么PVC一直pending?


在Vagrant中启动了几台CentOS 7虚拟机,安装Rancher Server集群,并从Rancher控制面板安装Kubernetes集群。
在命令行用Helm安装Prometheus:
$ helm install stable/prometheus


正常成功:
NAME:   jaunty-pike
LAST DEPLOYED: Mon Nov 13 11:26:03 2017
NAMESPACE: default
STATUS: DEPLOYED

RESOURCES:
==> v1/PersistentVolumeClaim
NAME                                 STATUS   VOLUME  CAPACITY  ACCESSMODES  AGE
jaunty-pike-prometheus-alertmanager  Pending  6s
jaunty-pike-prometheus-server        Pending  6s

==> v1/Service
NAME                                       CLUSTER-IP     EXTERNAL-IP  PORT(S)   AGE
jaunty-pike-prometheus-pushgateway         10.43.234.212  <none>       9091/TCP  6s
jaunty-pike-prometheus-alertmanager        10.43.147.195  <none>       80/TCP    6s
jaunty-pike-prometheus-node-exporter       None           <none>       9100/TCP  6s
jaunty-pike-prometheus-server              10.43.3.205    <none>       80/TCP    5s
jaunty-pike-prometheus-kube-state-metrics  None           <none>       80/TCP    5s

==> extensions/v1beta1/DaemonSet
NAME                                  DESIRED  CURRENT  READY  NODE-SELECTOR  AGE
jaunty-pike-prometheus-node-exporter  2        2        0      <none>         5s

==> extensions/v1beta1/Deployment
NAME                                       DESIRED  CURRENT  UP-TO-DATE  AVAILABLE  AGE
jaunty-pike-prometheus-server              1        1        1           0          5s
jaunty-pike-prometheus-pushgateway         1        1        1           0          5s
jaunty-pike-prometheus-alertmanager        1        1        1           0          5s
jaunty-pike-prometheus-kube-state-metrics  1        1        1           0          4s

==> v1/ConfigMap
NAME                                 DATA  AGE
jaunty-pike-prometheus-alertmanager  1     6s
jaunty-pike-prometheus-server        3     6s


NOTES:
The Prometheus server can be accessed via port 80 on the following DNS name from within your cluster:
jaunty-pike-prometheus-server.default.svc.cluster.local


Get the Prometheus server URL by running these commands in the same shell:
export POD_NAME=$(kubectl get pods --namespace default -l "app=prometheus,component=server" -o jsonpath="{.items[0].metadata.name}")
kubectl --namespace default port-forward $POD_NAME 9090


The Prometheus alertmanager can be accessed via port 80 on the following DNS name from within your cluster:
jaunty-pike-prometheus-alertmanager.default.svc.cluster.local


Get the Alertmanager URL by running these commands in the same shell:
export POD_NAME=$(kubectl get pods --namespace default -l "app=prometheus,component=alertmanager" -o jsonpath="{.items[0].metadata.name}")
kubectl --namespace default port-forward $POD_NAME 9093


The Prometheus PushGateway can be accessed via port 9091 on the following DNS name from within your cluster:
jaunty-pike-prometheus-pushgateway.default.svc.cluster.local


Get the PushGateway URL by running these commands in the same shell:
export POD_NAME=$(kubectl get pods --namespace default -l "app=prometheus,component=pushgateway" -o jsonpath="{.items[0].metadata.name}")
kubectl --namespace default port-forward $POD_NAME 9093

For more information on running Prometheus, visit:
https://prometheus.io/


但是查看PVC状态一直pending:
$ kubectl get pvc
NAME                                  STATUS    VOLUME    CAPACITY   ACCESS MODES   STORAGECLASS   AGE
jaunty-pike-prometheus-alertmanager   Pending                                                      1m
jaunty-pike-prometheus-server         Pending

$ kubectl get pv
No resources found.

$ kubectl describe pvc jaunty-pike-prometheus-alertmanager
Name:          jaunty-pike-prometheus-alertmanager
Namespace:     default
StorageClass:
Status:        Pending
Volume:
Labels:        app=prometheus
           chart=prometheus-4.6.9
           component=alertmanager
           heritage=Tiller
           release=jaunty-pike
Annotations:   <none>
Capacity:
Access Modes:
Events:
Type    Reason         Age                From                         Message
----    ------         ----               ----                         -------
Normal  FailedBinding  12s (x10 over 2m)  persistentvolume-controller  no persistent volumes available for this claim and no storage class is set

$ kubectl describe pvc jaunty-pike-prometheus-server
Name:          jaunty-pike-prometheus-server
Namespace:     default
StorageClass:
Status:        Pending
Volume:
Labels:        app=prometheus
           chart=prometheus-4.6.9
           component=server
           heritage=Tiller
           release=jaunty-pike
Annotations:   <none>
Capacity:
Access Modes:
Events:
Type    Reason         Age                From                         Message
----    ------         ----               ----                         -------
Normal  FailedBinding  12s (x14 over 3m)  persistentvolume-controller  no persistent volumes available for this claim and no storage class is set


为什么?是VirtualBox中Vagrant的硬盘不支持?还是Kubernets必要的设置没做?
https://kubernetes.io/docs/con ... laims
スクリーンショット_2017-11-13_12.02_.15_.png スクリーンショット_2017-11-13_11.40_.08_.png
已邀请:

要回复问题请先登录注册