CreateContainerConfigError - 配置資源缺失

問題摘要

項目 內容
發生時間 2025-12-24 17:12:09 +08:00
命名空間 chaos
故障類型 CreateContainerConfigError + Pending
影響範圍 2 個 Pod 無法啟動
處理時間 < 30 秒
最終狀態 ✅ 已修復

環境資訊

叢集配置

故障 Pod

Pod 狀態 缺失資源
missing-secret-754dcb6655-vfq5n CreateContainerConfigError Secret: not-exist-secret
pvc-missing Pending PVC: pvc-not-exist

診斷分析

<aside> 🔍

根因:配置資源缺失

問題 1 - CreateContainerConfigError

問題 2 - Pending (PVC 缺失)


修復步驟

1. 創建缺失的 Secret

kubectl create secret generic not-exist-secret \\
  --from-literal=foo=bar \\
  -n chaos

2. 重建 Secret Pod

kubectl delete pod -n chaos -l app=missing-secret \\
  --force --grace-period=0