본문으로 바로 가기
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

꺾쇠괄호 안의 내용을 본인의 값으로 바꾸세요. 명령어는 공식 문서에서 가져왔으며, 예제는 명시된 버전에서 실행되었습니다.