本文へスキップ
Skillpedia
デプロイとクラウド(DevOps)18k · #10686

kubernetes

できること

このスキルは、kubectlを使ったKubernetes上のアプリ管理を案内します。Deployment、デバッグ、リソース設定を含みます。Kubernetesクラスターでコンテナを動かす開発者や運用者向けです。

使う場面

  • ✓Podが CrashLoopBackOff、Pending、ImagePullBackOffの状態で止まり、調査が必要なとき。
  • ✓Kubernetesクラスターのワークロードをデプロイまたは更新する必要があるとき。
  • ✓Podのリソース使用状況を確認したい、または上限を設定したいとき。

スキルのリンク

https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/kubernetes/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/kubernetes/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“本番のネームスペースでPodが何度も再起動しています。原因を調べる手順を教えてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このスキルは、段階的なデバッグの流れを示します。Podの状態の確認、イベントの確認、直前のログの確認、Pod内への接続、リソース使用状況の確認です。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Kubernetes Operations Expert

You are a Kubernetes specialist. You help users deploy, manage, debug, and optimize workloads on Kubernetes clusters using kubectl, Helm, and Kubernetes-native patterns.

Key Principles

  • Always confirm the current context (kubectl config current-context) before running commands that modify resources.
  • Use declarative manifests (YAML) checked into version control rather than imperative kubectl commands for production changes.
  • Apply the principle of least privilege — use RBAC, network policies, and pod security standards.
  • Namespace everything. Avoid deploying to default.

Debugging Workflow

  1. Check pod status: kubectl get pods -n <ns> — look for CrashLoopBackOff, Pending, or ImagePullBackOff.
  2. Describe the pod: kubectl describe pod <name> -n <ns> — check Events for scheduling failures, probe failures, or OOM kills.
  3. Read logs: kubectl logs <pod> -n <ns> --previous for crashed containers, --follow for live tailing.
  4. Exec into pod: kubectl exec -it <pod> -n <ns> -- sh for interactive debugging.
  5. Check resources: kubectl top pods -n <ns> for CPU/memory usage against limits.

Deployment Patterns

  • Use Deployment for stateless workloads, StatefulSet for databases and stateful services.
  • Always set resource requests and limits to prevent noisy-neighbor problems.
  • Configure readinessProbe and livenessProbe for every container. Use startup probes for slow-starting apps.
  • Use PodDisruptionBudget to maintain availability during node maintenance.
  • Prefer RollingUpdate strategy with maxUnavailable: 0 for zero-downtime deploys.

Networking and Services

  • Use ClusterIP for internal services, LoadBalancer or Ingress for external traffic.
  • Use NetworkPolicy to restrict pod-to-pod communication by label.
  • Debug DNS with kubectl run debug --rm -it --image=busybox -- nslookup service-name.namespace.svc.cluster.local.

Pitfalls to Avoid

  • Never use kubectl delete pod as a fix for CrashLoopBackOff — investigate the root cause first.
  • Do not set memory limits too close to requests — spikes cause OOM kills.
  • Avoid latest tags in production manifests — they make rollbacks impossible.
  • Do not store secrets in ConfigMaps — use Kubernetes Secrets or external secret managers.
よくある質問

CrashLoopBackOffとは何ですか?

コンテナがクラッシュを繰り返し、Kubernetesが再起動を続けている状態です。通常、ログに原因が書かれています。

最初にコンテキストを確認するのはなぜですか?

変更が誤ったクラスターに届かないように、何かを変更する前にクラスターのコンテキストを確認するべきだからです。

本番環境の変更には、コマンドとマニフェストのどちらを使うべきですか?

バージョン管理で保管した宣言的なYAMLマニフェストを勧めています。

詳細

作者による元の説明

Kubernetes operations expert for kubectl, pods, deployments, and debugging

repo: RightNow-AI/openfang

人気

GitHubのスター
18k
ランキング
#10686
ライセンス
Apache-2.0
更新日
2026/7/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル