{
  "id": "kubernetes/volume-expand-error-feature-gate",
  "signature": "Error: volume expansion is not supported for this volume source",
  "signature_zh": "错误：此卷源不支持卷扩展",
  "regex": "volume expansion is not supported for this volume source",
  "domain": "kubernetes",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The PersistentVolumeClaim's storage class does not have 'allowVolumeExpansion: true', or the CSI driver does not support online expansion.",
  "root_cause_type": "generic",
  "root_cause_zh": "PersistentVolumeClaim 的存储类没有设置 'allowVolumeExpansion: true'，或者 CSI 驱动程序不支持在线扩展。",
  "versions": [
    {
      "version": "kubernetes 1.21",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "kubernetes 1.22",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "kubernetes 1.24",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "kubernetes 1.26",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Manually edit the PVC spec to increase size without checking the storage class.",
      "why_fails": "The controller will reject the request because the storage class does not allow expansion; the PVC will remain unchanged.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Delete and recreate the PVC with a larger size.",
      "why_fails": "This destroys the existing data unless you have a backup, and it does not enable expansion for future use.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Patch the storage class to enable expansion: `kubectl patch storageclass <storage-class-name> -p '{\"allowVolumeExpansion\": true}'`. Then retry the PVC resize.",
      "success_rate": 0.85,
      "how": "Patch the storage class to enable expansion: `kubectl patch storageclass <storage-class-name> -p '{\"allowVolumeExpansion\": true}'`. Then retry the PVC resize.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the CSI driver does not support expansion, migrate to a different storage class that supports it, or use a StatefulSet with a new PVC and copy data manually.",
      "success_rate": 0.7,
      "how": "If the CSI driver does not support expansion, migrate to a different storage class that supports it, or use a StatefulSet with a new PVC and copy data manually.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "修补存储类以启用扩展：`kubectl patch storageclass <storage-class-name> -p '{\"allowVolumeExpansion\": true}'`。然后重试 PVC 大小调整。",
    "如果 CSI 驱动程序不支持扩展，请迁移到支持扩展的其他存储类，或使用带有新 PVC 的 StatefulSet 并手动复制数据。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://kubernetes.io/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims",
  "official_doc_section": null,
  "error_code": "K8S-VOL-002",
  "verification_tier": "ai_generated",
  "confidence": 0.82,
  "fix_success_rate": 0.78,
  "resolvable": "true",
  "first_seen": "2023-09-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}