Kubernetes pod仍处于“ContainerCreating”状态

时间:2017-09-19 12:38:24

标签: kubernetes

我对Kubernetes环境有疑问。我有K8s云,在我添加后,将一个持久卷分配给一个pod,此pod仍处于“ContainerCreating”状态。此PV已正确分配PVC。 PVC位于两个带有副本2的外部GlusterFS服务器上。

PV看起来像这样:

apiVersion: v1
kind: PersistentVolume
metadata:
  annotations:
    definitionVersion: "20170919"
  name: tarsier-pv
spec:
  accessModes:
  - ReadWriteMany
  capacity:
    storage: 50Gi
  glusterfs:
    endpoints: glusterfs-cluster
    path: tarsier-prep
  persistentVolumeReclaimPolicy: Recycle

PVC看起来像这样:

    apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: tarsier-pvc
  annotations:
    definitionVersion: "20170919"
spec:
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: 50Gi
  volumeName: tarsier-pv
status:
  accessModes:
  - ReadWriteMany
  capacity:
    storage: 50Gi
  phase: Bound

Pods RC看起来像这样:

    apiVersion: v1
kind: ReplicationController
metadata:
  name: xxx
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: xxxxx
    spec:
      volumes:
      - name: tarsier-pv
        persistentVolumeClaim:
          claimName: tarsier-pvc
        ...
      containers:
      - name: xxx
        ...
        volumeMounts:
        - name: tarsier-pv
          mountPath: "/shared_data/storage"

Kubectl描述pod xxx没有返回错误。

kubectl logs xxx返回:

Error from server (BadRequest): container "xxx" in pod "xxx" is waiting to start: ContainerCreating.

您是否有任何想法可能出错或在哪里找到详细的日志? THX提前。

编辑: Gluster挂载正确安装在Master上,如果我手动添加任何文件,它就会在两个Gluster服务器上正确复制

1 个答案:

答案 0 :(得分:1)

谢谢你们所有人。 EP上配置错误。无论如何,所有可能的日志中都没有任何信息或“或kubectl描述pod xxx”。

干杯