大网数据广告活动
服务器运维问答

Pod fails to mount ConfigMap: `failed to sync configmap cache: timed out waiting for the condition`

· 52CE 我爱测

I am trying to deploy a pod on a v1.18 GKE kubernetes cluster My pod loop-crashes because it fails to mount its config map: $ kubectl describe pod <pod> ... Volumes: cm-cxf-conf: Type: ConfigMap (a volume populated by a ConfigMap…

问题原文

原帖链接 · Elouan Keryell-Even · CC BY-SA 4.0

I am trying to deploy a pod on a v1.18 GKE kubernetes cluster

My pod loop-crashes because it fails to mount its config map:

$ kubectl describe pod <pod>

...

Volumes:
  cm-cxf-conf:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      project-cm-cxf-conf
    Optional:  false

...

Events:
  Type     Reason                  Age                    From                     Message
  ----     ------                  ----                   ----                     -------
  Warning  FailedMount             41m                    kubelet                  MountVolume.SetUp failed for volume "cm-cxf-conf" : failed to sync configmap cache: timed out waiting for the condition

...

However, the config map DOES exist:

$ kubectl get configmap project-cm-cxf-conf
project-cm-cxf-conf            1      4h40m

What could be the cause of this error? How can I fix it?

Related threads

已采纳解答

原帖链接 · Elouan Keryell-Even · CC BY-SA 4.0

Actually, the FailedMount are just warnings without consequences. When checking kubelet logs, there were other logs afterwards stating it finally succeeded mounting the Config Maps, after retrying.

The real reason why my pod was loop-crashing was a Java application-side error (a JAR was missing in the container), in the end nothing to do with kubernetes

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-09-17)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。