メインコンテンツへスキップ
kitlocal.dev

kubectlチートシート

ローカルで実行

100% ブラウザ内で処理されます。入力や出力が端末の外に送信されることはありません。

Kubernetes 1.30+ における Pod、Deployment、Service の確認、ログ閲覧、exec デバッグ、ロールアウト、コンテキスト切替、JSONPath クエリ用 Kubernetes CLI コマンド。

動作の仕組み

kubectl reads and reconciles declarative resource manifests against the API server: `get`/`describe`/`logs` diagnose state, while `apply`/`rollout` safely drive cluster changes.

サバイバルキット

最初に覚えるべき最小限のコマンド。

42 件のコマンド

キーボードショートカット/検索にフォーカスJK選択を移動C選択項目をコピーF選択項目をブックマークEsc検索をクリア

Contexts, Namespaces & Discovery

Verify which cluster and namespace you target before reading or changing state.

  • 基本

    Print the currently active cluster context before running commands

    kubectl config current-context

    使いどころ

    Prevents accidentally running dev commands against a production cluster.

    実例

    kubectl config current-context

Inspect, Logs & Events

Diagnose CrashLoopBackOff, ImagePullBackOff, pending pods, and probe failures.

Shell, Port-Forward & Copy

Connect to cluster services locally, exec into pods, and transfer files.

Apply, Dry-Run & Rollouts

Validate manifests safely, watch rollouts, scale, and roll back cleanly.

Nodes, RBAC & Cleanup

Verify permissions, check resource usage, cordon nodes, and clean pods.

KitLocalツールで試す

2026/11/15 に検証済み · Kubernetes 1.30+ kubectl CLI で検証済み

出典: Kubernetes kubectl Reference · kubectl Quick Reference

山括弧内の内容は実際の値に置き換えてください。コマンドは公式ドキュメントに基づいており、実例は記載されたバージョンで実行確認されています。