我有一个关于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
Run Code Online (Sandbox Code Playgroud)
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
Run Code Online (Sandbox Code Playgroud)
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"
Run Code Online (Sandbox Code Playgroud)
Kubectl描述pod xxx返回没有错误.
kubectl logs xxx返回:
Error from server (BadRequest): container "xxx" in pod "xxx" is waiting to start: ContainerCreating.
Run Code Online (Sandbox Code Playgroud)
你有什么想法可能是错的或我在哪里可以找到任何详细的日志?THX提前.
编辑:Gluster挂载正确安装在Master上,如果我手动添加任何文件,它会在两个Gluster服务器上正确复制
小智 10
要查看问题所在,请检查事件:
kubectl get events --sort-by=.metadata.creationTimestamp
Run Code Online (Sandbox Code Playgroud)
谢谢大家。EP 上的配置错误。无论如何,所有可能的日志或“或 kubectl 描述 pod xxx”中都没有任何信息。
干杯
| 归档时间: |
|
| 查看次数: |
5241 次 |
| 最近记录: |