IT InfraTree 가이드

쿠버네티스 점검 가이드

Kubernetes 장애가 복잡해 보일 때 먼저 나누는 방법

CrashLoopBackOff, readiness 실패, ingress 404, service endpoint 문제, CoreDNS 혼선처럼 범위가 넓어 보이는 쿠버네티스 장애를 단계적으로 나누는 검색형 가이드입니다.

체크리스트

이 순서대로 먼저 확인하세요

CrashLoopBackOff, readiness probe 실패, ingress 404, 서비스 엔드포인트 없음, CoreDNS 혼선, kubectl 디버깅을 먼저 정리할 때 적합합니다.

항목 1

Read pod status, events, and previous logs before editing manifests.

항목 2

Separate workload issues from service, ingress, and cluster routing issues.

항목 3

Review rollout, config, secret, and image changes before scaling anything.

항목 4

Confirm whether the scope is one workload, one namespace, or cluster-wide.

항목 5

Check whether the failure is startup-only, traffic-only, or dependency-only before calling it a pod incident.

대표 증상

Kubernetes 장애가 복잡해 보일 때 먼저 나누는 방법 상황은 하나의 설정값만 틀린 문제가 아니라 배포 경계, 런타임 상태, 캐시, 권한, 네트워크 경로가 함께 어긋났을 때 자주 나타납니다. 검색으로 들어온 사용자는 먼저 증상을 좁혀야 하므로, 이 가이드는 CrashLoopBackOff, readiness probe 실패, ingress 404, 서비스 엔드포인트 없음, CoreDNS 혼선, kubectl 디버깅을 먼저 정리할 때 적합합니다.를 기준으로 처음 확인할 신호를 정리합니다.

초반에는 재시작이나 전체 롤백부터 시도하기보다 영향 범위가 한 노드, 한 Pod, 한 job, 한 사용자, 한 경로에만 묶여 있는지 확인해야 합니다. 범위가 좁으면 최근 변경과 오래 남은 상태를 비교하고, 범위가 넓으면 공통 의존성부터 확인하는 편이 안전합니다.

먼저 확인할 신호

가장 먼저 볼 것은 오류 메시지의 마지막 줄이 아니라 같은 실패가 반복되는 경계입니다. ImagePullBackOff, readiness failed, no endpoints, ingress 404, works in pod but fails through service 같은 신호를 기준으로 문제를 묶으면 로그가 길어져도 원인 후보를 줄일 수 있습니다.

  • Read pod status, events, and previous logs before editing manifests.
  • Separate workload issues from service, ingress, and cluster routing issues.
  • Review rollout, config, secret, and image changes before scaling anything.
  • Confirm whether the scope is one workload, one namespace, or cluster-wide.
  • Check whether the failure is startup-only, traffic-only, or dependency-only before calling it a pod incident.

로그와 CLI 예시

아래 명령은 정답을 바로 알려주는 명령이 아니라, 원인을 좁히기 위한 첫 관찰 지점입니다. 명령 결과를 복사해 두고 정상 시점 또는 같은 역할의 정상 리소스와 비교하면 재시도만 반복하는 시간을 줄일 수 있습니다.

kubectl describe pod <pod> -n <namespace>
kubectl logs <pod> -n <namespace> --previous

흔한 오진

운영 장애에서 가장 위험한 패턴은 증상 이름을 원인으로 착각하는 것입니다. 같은 timeout, permission denied, rollout failure라도 실제 원인은 캐시, 권한 상속, Secret 범위, 오래된 클라이언트 연결, 프록시 헤더처럼 다른 층에 있을 수 있습니다.

  • Restarting pods before collecting event history and previous container logs.
  • Calling every 404 or timeout an ingress bug before checking endpoints, namespace drift, and service selectors.

안전한 복구 순서

복구는 가장 작은 단위에서 시작합니다. 먼저 읽기 전용 확인으로 현재 상태를 고정하고, 그다음 영향이 제한된 리소스에서 변경을 검증합니다. 서비스 전체 재시작, 캐시 전체 삭제, 보안 정책 완화처럼 되돌리기 큰 조치는 원인 후보가 좁혀진 뒤에 선택해야 합니다.

  • Most Kubernetes incidents only look like pod failures. The real fault often sits in config drift or traffic policy.
  • A Running pod with failed traffic usually points to readiness, service selection, ingress policy, auth sidecar, or DNS path issues.
  • The fastest responders compare one healthy path and one broken path instead of changing manifests first.

재발 방지

장애가 끝난 뒤에는 원인 한 줄보다 “왜 그 상태가 오래 남았는지”를 기록해야 합니다. 배포 파이프라인, 런타임 reload, 권한 상속, 인증서 갱신, 네트워크 정책처럼 자동화와 운영 절차 사이에 빈틈이 있었는지 확인합니다.

Kubernetes Config and Rollouts, Kubernetes Ingress and Traffic, Kubernetes Scheduling and Capacity, Timeouts and Latency, CrashLoop and Restarts 허브와 함께 보면 같은 증상을 다른 환경에서도 다시 점검할 수 있습니다.

관련 InfraTree 문제

아래 문제들은 이 가이드의 내용을 실제 시나리오로 연습하기 위한 공개 문제입니다. 글을 읽은 뒤 한 문제만 풀어도 신호를 먼저 나누고 복구 방향을 문장으로 정리하는 연습을 할 수 있습니다.

실무 메모

현장에서 특히 놓치기 쉬운 포인트

교재형 설명보다 실제 장애 대응에서 의미 있는 메모만 따로 묶었습니다.

항목 1

Most Kubernetes incidents only look like pod failures. The real fault often sits in config drift or traffic policy.

항목 2

A Running pod with failed traffic usually points to readiness, service selection, ingress policy, auth sidecar, or DNS path issues.

항목 3

The fastest responders compare one healthy path and one broken path instead of changing manifests first.

자주 하는 실수

진단 전에 먼저 버릴 오해

대응이 길어지는 대표적인 오진과 습관을 먼저 걸러낼 수 있게 정리했습니다.

항목 1

Restarting pods before collecting event history and previous container logs.

항목 2

Calling every 404 or timeout an ingress bug before checking endpoints, namespace drift, and service selectors.

연결 허브

같이 보면 좋은 허브

이 가이드와 직접 연결되는 토픽, 증상, 벤더, 자격증 허브로 바로 이동할 수 있습니다.

Kubernetes Config and Rollouts

Kubernetes config and rollouts troubleshooting landing page focused on ConfigMap and Secret drift, probe mistakes, Helm values merge issues, GitOps dependency ordering...

Kubernetes Ingress and Traffic

Kubernetes ingress and traffic troubleshooting landing page focused on Ingress, Gateway, Service, endpoint, rewrite, and external load balancer failures where pods loo...

Kubernetes Scheduling and Capacity

Node pressure, scheduling, affinity, taints, eviction, and cluster capacity drills. Kubernetes Scheduling and Capacity landing page grouping K8s troubleshooting search...

Timeouts and Latency

Slow responses, upstream timeout, and network path latency signals. Timeouts and Latency landing page grouping CI/CD troubleshooting searches around Monorepo Triggerin...

CrashLoop and Restarts

Repeated restarts, unstable containers, and unhealthy workload loops. CrashLoop and Restarts landing page grouping K8s troubleshooting searches around Cluster Debug, K...

NGINX

NGINX troubleshooting landing page for ingress, reverse proxy, path rewrite, callback, and edge-to-upstream routing failures.

연결 가이드

같은 흐름의 가이드를 이어서 보기

같은 검색 흐름의 가이드를 먼저 묶어, 다음 탐색 경로가 바로 보이도록 했습니다.

대표 문제

이 가이드와 가장 잘 맞는 문제

가이드에서 바로 연습으로 넘어갈 수 있도록 대표 문제를 먼저 보여줍니다.

다음 단계

가이드 다음에 바로 이어볼 흐름

허브, 대표 문제, 학습 허브 순서로 이동해 검색 흐름을 실제 연습과 기록으로 이어보세요.

FAQ

이 페이지가 먼저 답해야 하는 질문

문제 상세나 학습 허브로 넘어가기 전에 가장 자주 묻는 질문을 빠르게 읽을 수 있게 했습니다.

What is the best first move for a CrashLoopBackOff search case?

Read events and previous logs first. Restarting too early often removes the best evidence.

Why can a pod be Running but the application still fail for users?

Running only means the container process is alive. Readiness, service selectors, ingress rules, auth sidecars, and dependency reachability can still break user traffic.

When should I treat it as a cluster-wide issue instead of one workload issue?

When multiple namespaces fail in similar ways, DNS answers drift, scheduling fails broadly, or one shared control-plane dependency changed around the same time.