Логотип K8s Storage Troubleshooting

K8s Storage Troubleshooting

Організація
k8s-servant
k8s-storage-troubleshooting

Використовуйте, якщо сховище Kubernetes заважає роботі навантаження: PersistentVolumeClaim завис у стані Pending, з’являються події ProvisioningFailed, StorageClass не існує або provisioner не підтримує потрібний режим доступу, поди перебувають у стані Pending із повідомленням "unbound immediate PersistentVolumeClaims", виникають помилки FailedAttachVolume, FailedMount чи Multi-Attach, PVC або PV завис у стані Terminating чи Released або том заповнений і не розширюється. Перевіряє стан за допомогою kubectl get, describe та events і пропонує способи виправлення. Спочатку лише аналізує та запитує дозвіл, перш ніж щось змінювати.

Огляд

Видавецьk8s-servant
Репозиторійk8s-skills
Назва навичкиk8s-storage-troubleshooting
Зірки
36
Форки
7
Файли в пакеті
3
ЛіцензіяApache-2.0
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 3

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Видавець на GitHub: k8s-servant. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ K8s Storage Troubleshooting у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/k8s-servant/k8s-skills/tree/main/skills/k8s-storage-troubleshooting
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/k8s-servant/k8s-skills.git /tmp/k8s-skills
mkdir -p .claude/skills
cp -r /tmp/k8s-skills/skills/k8s-storage-troubleshooting .claude/skills/k8s-storage-troubleshooting
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку K8s Storage Troubleshooting в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку K8s Storage Troubleshooting, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка K8s Storage Troubleshooting не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Kubernetes storage troubleshooting

Find out why a volume does not get to a pod, or why it does not work once it is there, and propose a fix. Read first, ask before changing. Run the investigation commands freely. Run a command under an "Ask first" line only after the user approves that exact command; if your credentials do not allow it, give it to the user to run. Never run a "Proposed fix"; hand it to the user.

Volumes hold data, and many storage changes cannot be undone: a volume cannot shrink, a deleted claim can take its data with it, and most of a claim's spec cannot change after it is created. So most fixes here are proposed fixes, with the reason said.

The commands use placeholders: my-namespace, my-app, my-pod, my-data (the PVC), my-pv, my-class and my-node. Replace them with the real names. Never read Secrets (a StorageClass or CSI driver may reference some; read their names only). If output contains passwords, tokens or keys, do not repeat them.

When to use

  • A PVC is Pending, or a pod is Pending because of its PVC.
  • ProvisioningFailed, FailedAttachVolume, FailedMount or Multi-Attach error events.
  • A PVC or PV is stuck Terminating, or a PV is Released and not reused.
  • A volume is full, or a PVC resize does not finish.

Hand-offs, by skill name. When the evidence points elsewhere, continue with that skill; if it is not installed, keep going with the steps here and tell the user which skill would help:

  • The pod is Pending for CPU, memory, taints or node selectors, not its volume: k8s-node-troubleshooting.
  • The volume is mounted and the app still fails (crash, permissions it logs, probes): k8s-workload-troubleshooting.
  • On AKS, Azure refuses the disk or share (an Azure error code in ProvisioningFailed or FailedAttachVolume, a disk zone conflict, Azure Files mount errors): k8s-aks-troubleshooting.
  • The PVC belongs to a CloudNativePG Cluster (named after an instance, my-db-1, with the label cnpg.io/cluster) and the Cluster's own status matters: k8s-cloudnative-pg-troubleshooting.
  • The volume data is missing after a Velero restore, or a Velero volume backup failed: k8s-velero-troubleshooting.

Investigate

Work through the steps in order. Stop when you have the cause and its evidence.

1. See the claims and their status, and which StorageClass each one asks for.

bash
kubectl get pvc -n my-namespace
kubectl describe pvc my-data -n my-namespace
kubectl events -n my-namespace --for persistentvolumeclaim/my-data

2. See the StorageClasses: which exist, which is the default, the provisioner, the binding mode and whether volumes can expand. StorageClasses and PVs are cluster-scoped, and the built-in view role cannot read them; if these commands are forbidden, say so, and read the class and the provisioner from describe pvc (its StorageClass and the volume.kubernetes.io/storage-provisioner annotation) and from the events.

bash
kubectl get storageclass
kubectl describe storageclass my-class

3. See the PersistentVolumes, if the claim is bound or should bind to an existing one.

bash
kubectl get pv
kubectl describe pv my-pv

4. See the pods that use the claim and their events. A claim waits for its first pod when the class uses WaitForFirstConsumer.

bash
kubectl get pods -n my-namespace -o wide
kubectl describe pod my-pod -n my-namespace
kubectl get deployment my-app -n my-namespace -o jsonpath='{.spec.replicas}{"\n"}{.spec.template.spec.volumes}{"\n"}'

5. For attach or mount errors, look at the CSI side: the attachment for each node, the drivers and the driver's pods.

bash
kubectl get volumeattachments
kubectl get csidrivers
kubectl get csinode my-node -o yaml
kubectl get pods -A -o wide | grep -i csi

6. Open the matching reference and follow its steps:

What you seeReference
PVC Pending, ProvisioningFailed, WaitForFirstConsumer, Released PVreferences/pending.md
FailedAttachVolume, FailedMount, Multi-Attach error, Terminatingreferences/attach-mount.md
Volume full, No space left on device, resize not finishing, evictions for ephemeral storagereferences/space-and-expansion.md

Read the results

What the common findings mean (Kubernetes 1.37):

  • PVC Pending with WaitForFirstConsumer: the class binds and provisions only when a pod that uses the claim is scheduled. With no such pod (a Deployment at 0 replicas, a claim created ahead of time), Pending is expected, not a fault.
  • PVC Pending with ProvisioningFailed: the provisioner refused. The message says why: the class does not exist (storageclass.storage.k8s.io "my-class" not found), the access mode is not supported, the size or a parameter is invalid, or a cloud quota.
  • No storageClassName gets the default class (annotation storageclass.kubernetes.io/is-default-class: "true"). If no default existed when the claim was created, the claim gets one later, when a default appears. storageClassName: "" means no provisioning: only a PV with no class can bind.
  • A pod Pending with pod has unbound immediate PersistentVolumeClaims (the scheduler's message on Kubernetes 1.37): fix the claim first; the pod follows.
  • Access modes: ReadWriteOnce (one node at a time; several pods on that node can share it), ReadOnlyMany, ReadWriteMany, ReadWriteOncePod (one pod; CSI volumes only). The driver decides which it supports; many block-storage drivers have no ReadWriteMany.
  • Most of a claim's spec cannot change after it is created: the API server rejects changes to the class or the access modes. Only the storage request (up, if the class allows expansion) and volumeAttributesClassName can change. A different class or mode means a new claim.
  • Terminating for a claim in use: deletion waits for the kubernetes.io/pvc-protection finalizer until no pod uses it. That protects the data; it is not a fault.

State the cause in one sentence, then the evidence you saw (the event and its message, the class, the access mode, the binding mode), then the proposed fix.

Proposed fix

Show each fix to the user before running it: what it changes and how to undo it. Scaling a workload is reversible, so it goes under "Ask first" and runs only after the user says yes. Deleting or recreating a claim or a PV, removing a finalizer, rebinding a PV and expanding a volume cannot be undone: never run them yourself; hand them to the user as proposed fixes and say why. Prefer fixing the source the workload is deployed from (manifest, Helm values, GitOps repository): a claim's class and access mode are set there.

Start the first pod of a claim that waits for its consumer, if the user wants it bound now (write the undo with the replicas you found):

Ask first: the agent runs this only after the user approves it.

bash
kubectl scale deployment/my-app --replicas=1 -n my-namespace
# Undo: kubectl scale deployment/my-app --replicas=0 -n my-namespace

Recreate a claim that asks for a class this cluster does not have. The class cannot be changed in place, and deleting a claim can delete its volume, so a human runs this, and only for a claim that never bound (no data):

Proposed fix: review before running. The agent does not run this.

bash
kubectl get pvc my-data -n my-namespace -o yaml > my-data-pvc.yaml
kubectl delete pvc my-data -n my-namespace
# Copy my-data-pvc.yaml to my-data-new.yaml and edit the copy: set spec.storageClassName to an
# existing class; remove status, metadata.uid, metadata.resourceVersion,
# metadata.creationTimestamp and the volume.kubernetes.io/* annotations. Then:
kubectl apply -f my-data-new.yaml
# Undo: kubectl delete pvc my-data -n my-namespace, then apply my-data-pvc.yaml with the same metadata and status fields removed

Better: fix storageClassName in the app's source and let the next deploy create the claim.

Sources

Checked against the Kubernetes 1.37 documentation:

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ K8s Storage Troubleshooting?

Використовуйте, якщо сховище Kubernetes заважає роботі навантаження: PersistentVolumeClaim завис у стані Pending, з’являються події ProvisioningFailed, StorageClass не існує або provisioner не підтримує потрібний режим доступу, поди перебувають у стані Pending із повідомленням "unbound immediate PersistentVolumeClaims", виникають помилки FailedAttachVolume, FailedMount чи Multi-Attach, PVC або PV завис у стані Terminating чи Released або том заповнений і не розширюється. Перевіряє стан за допомогою kubectl get, describe та events і пропонує способи виправлення. Спочатку лише аналізує та зап...

Навіщо використовувати K8s Storage Troubleshooting у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. K8s Storage Troubleshooting — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити K8s Storage Troubleshooting у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/k8s-servant/k8s-skills/tree/main/skills/k8s-storage-troubleshooting. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати K8s Storage Troubleshooting?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати K8s Storage Troubleshooting?

Зі скількома забажаєте. У TypingMind ви можете використовувати K8s Storage Troubleshooting із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ K8s Storage Troubleshooting?

Так. На GitHub цю навичку публікує k8s-servant за ліцензією Apache-2.0. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇