我如何解决这个kubernetes pod错误,它一直运行到CreateContainerConfigError状态

swvgeqrz  于 2023-06-21  发布在  Kubernetes
关注(0)|答案(1)|浏览(194)

每次我尝试在Azure Kubernetes服务上安装Helm Chart时都会遇到此错误。最初我得到了这个错误:

Events:
  Type     Reason     Age               From               Message
  ----     ------     ----              ----               -------
  Normal   Scheduled  44s               default-scheduler  Successfully assigned xxx/xxx-cdn-864bb-sz8p to aks-2810-vmss00001y
  Normal   Pulled     43s               kubelet            Container image "df3.azurecr.io/cist/cist-istio-proxyv2:1.16.3" already present on machine
  Normal   Created    43s               kubelet            Created container istio-init
  Normal   Started    43s               kubelet            Started container istio-init
  Normal   Pulled     42s               kubelet            Container image "ncdaksbsztankosdwdbdf3.azurecr.io/cist/cist-istio-proxyv2:1.16.3" already present on machine
  Normal   Created    42s               kubelet            Created container istio-proxy
  Normal   Started    42s               kubelet            Started container istio-proxy
  Normal   Pulling    42s               kubelet            Pulling image "df3.azurecr.io/xxx-engine:23.6.0-123.gf12345"
  Normal   Pulled     30s               kubelet            Successfully pulled image "df3.azurecr.io/xxx-engine:23.6.0-123.gf12345" in 11.461509574s
  Warning  Failed     2s (x6 over 30s)  kubelet            Error: couldn't find key CDS_TOKEN in Secret cds/cds-token
  Normal   Pulled     2s (x5 over 29s)  kubelet            Container image "df3.azurecr.io/cds-engine:23.6.0-562.gf195010" already present on machine ```

i then created the secret but now get this.
Events:
  Type     Reason     Age                    From               Message
  ----     ------     ----                   ----               -------
  Normal   Scheduled  29m                    default-scheduler  Successfully assigned xxx/xxx-hooks-1234xl2 to aks-ncd-2810-vmss1q
  Warning  Failed     27m (x12 over 29m)     kubelet            Error: couldn't find key XXX_TOKEN in Secret xxx/xxx-token
  Normal   Pulled     4m26s (x119 over 29m)  kubelet            Container image "df3.azurecr.io/xxx-engine:23.6.0-123.gf12345" already present on machine
jhdbpxl9

jhdbpxl91#

您有一个对k8s secret中的密钥的引用,但该密钥不存在于secret中。
转到密钥xxx/xxx-token,并在那里添加密钥XXX_TOKEN和一个值。

相关问题