Skip to content

Split View: KCNA 쿠버네티스 클라우드 네이티브 어소시에이트 실전 모의고사 60문제

|

KCNA 쿠버네티스 클라우드 네이티브 어소시에이트 실전 모의고사 60문제

1. KCNA 시험 개요

**KCNA(Kubernetes and Cloud Native Associate)**는 CNCF(Cloud Native Computing Foundation)에서 주관하는 입문 수준의 Kubernetes 자격증입니다.

항목내용
시험 시간90분
문제 수60문제 (MCQ)
합격선75% (45문제 이상)
시험 방식온라인 원격 감독
유효 기간3년
응시 비용USD 250

2. Kubestronaut 프로그램 소개

Kubestronaut는 CNCF의 5개 Kubernetes 자격증을 모두 취득한 사람에게 부여되는 명예 타이틀입니다.

자격증유형합격선
KCNA이론 (MCQ)75%
KCSA이론 (MCQ)75%
CKA실기66%
CKAD실기66%
CKS실기67%

3. 도메인별 출제 비율

도메인비율
Kubernetes Fundamentals46%
Container Orchestration22%
Cloud Native Architecture16%
Cloud Native Observability8%
Cloud Native Application Delivery8%

4. 핵심 개념 요약

Kubernetes 아키텍처

Control Plane 컴포넌트:

  • kube-apiserver: 클러스터의 유일한 진입점, REST API 제공
  • etcd: 모든 클러스터 상태를 저장하는 분산 키-값 스토어
  • kube-scheduler: 신규 Pod를 적절한 노드에 배치 결정
  • kube-controller-manager: Deployment, ReplicaSet 등 컨트롤러 루프 실행

Worker Node 컴포넌트:

  • kubelet: 노드에서 Pod 생명주기 관리
  • kube-proxy: 서비스 네트워크 규칙 관리 (iptables/IPVS)
  • Container Runtime: containerd, CRI-O 등 (OCI 스펙 준수)

Cloud Native 핵심 원칙

  • 12-Factor App: 현대 클라우드 앱 개발 방법론 (코드베이스, 의존성, 설정 등 12가지 원칙)
  • GitOps: Git을 단일 진실의 원천으로 사용하여 인프라를 선언적으로 관리
  • Service Mesh: 서비스 간 통신을 인프라 레이어에서 처리 (mTLS, 트래픽 관리)

5. 실전 연습 문제 60문제

Q1. Kubernetes Control Plane의 모든 클러스터 상태(설정, 메타데이터)를 저장하는 컴포넌트는?

A) kube-apiserver B) etcd C) kube-scheduler D) kube-controller-manager

정답: B

설명: etcd는 Kubernetes의 분산 키-값 스토어로, 모든 클러스터 상태와 설정 데이터를 영속적으로 저장합니다. kube-apiserver만이 etcd에 직접 접근합니다.

Q2. 신규로 생성된 Pod를 어떤 Worker Node에 배치할지 결정하는 Control Plane 컴포넌트는?

A) kubelet B) kube-proxy C) kube-scheduler D) kube-controller-manager

정답: C

설명: kube-scheduler는 새로 생성된 Pod 중 아직 노드에 배치되지 않은 것을 감지하고, 리소스 요구사항, nodeSelector, affinity 등 여러 조건을 기반으로 최적의 노드를 선택합니다.

Q3. kubelet의 주요 역할로 올바른 것은?

A) 클러스터 네트워크 정책 관리 B) 각 Worker Node에서 Pod와 컨테이너의 생명주기를 관리 C) API 요청 인증 및 권한 부여 D) 클러스터 상태 데이터 저장

정답: B

설명: kubelet은 각 Worker Node에서 실행되며, kube-apiserver로부터 PodSpec을 받아 해당 사양에 따라 컨테이너가 실행되고 정상 작동하는지 관리합니다. 컨테이너 런타임과 통신하여 컨테이너를 실행/중지합니다.

Q4. Kubernetes에서 가장 작은 배포 단위는?

A) Container B) Pod C) ReplicaSet D) Node

정답: B

설명: Pod는 Kubernetes에서 배포 가능한 가장 작은 단위입니다. 하나 이상의 컨테이너를 포함하며, 공유 네트워크 네임스페이스와 스토리지를 가집니다. 같은 Pod의 컨테이너들은 localhost로 통신합니다.

Q5. Deployment가 관리하는 Pod의 복제본 수를 유지하는 컴포넌트는?

A) kube-scheduler B) DaemonSet C) ReplicaSet D) StatefulSet

정답: C

설명: ReplicaSet은 지정된 수의 Pod 복제본이 항상 실행 중임을 보장합니다. Deployment는 ReplicaSet을 관리하여 선언적 업데이트와 롤백 기능을 제공합니다.

Q6. Kubernetes Service의 타입 중 클러스터 내부에서만 접근 가능한 타입은?

A) NodePort B) LoadBalancer C) ClusterIP D) ExternalName

정답: C

설명: ClusterIP는 기본 Service 타입으로, 클러스터 내부에서만 접근 가능한 가상 IP를 할당합니다. NodePort는 각 노드의 포트를 통해 외부 접근을, LoadBalancer는 클라우드 제공업체의 로드밸런서를 프로비저닝합니다.

Q7. 여러 Kubernetes 리소스를 논리적으로 격리하는 데 사용하는 리소스는?

A) Label B) Annotation C) Namespace D) ConfigMap

정답: C

설명: Namespace는 단일 클러스터 내에서 리소스를 논리적으로 격리하는 메커니즘입니다. 팀별, 환경별(dev/staging/prod) 격리에 활용됩니다. 기본 Namespace로는 default, kube-system, kube-public이 있습니다.

Q8. 애플리케이션 설정 데이터(비민감)를 저장하는 Kubernetes 리소스는?

A) Secret B) ConfigMap C) PersistentVolume D) ServiceAccount

정답: B

설명: ConfigMap은 비민감 설정 데이터를 키-값 쌍으로 저장합니다. 환경변수나 볼륨 마운트를 통해 Pod에 주입됩니다. 민감한 데이터(비밀번호, 토큰)는 Secret을 사용해야 합니다.

Q9. Kubernetes API에서 선언적(Declarative) 방식의 특징으로 올바른 것은?

A) 수행할 작업을 단계별로 명령 B) 원하는 최종 상태를 정의하면 시스템이 해당 상태를 달성 C) 명령어로 즉시 리소스를 조작 D) 현재 상태를 조회만 하는 방식

정답: B

설명: 선언적 방식은 kubectl apply -f manifest.yaml처럼 원하는 최종 상태를 YAML/JSON으로 정의하면 Kubernetes가 현재 상태와 비교하여 원하는 상태로 수렴합니다. 반면 명령적(Imperative) 방식은 kubectl create deployment처럼 즉각적인 동작을 지시합니다.

Q10. OCI(Open Container Initiative)의 주요 스펙에 포함되지 않는 것은?

A) Image Specification B) Runtime Specification C) Distribution Specification D) Orchestration Specification

정답: D

설명: OCI는 Image Spec(이미지 포맷), Runtime Spec(컨테이너 실행 방식), Distribution Spec(레지스트리 배포 프로토콜) 3가지 스펙을 정의합니다. Orchestration(오케스트레이션)은 OCI 스펙에 포함되지 않으며 Kubernetes 같은 별도 도구의 영역입니다.

Q11. containerd와 Docker의 관계로 올바른 것은?

A) containerd는 Docker를 완전히 대체할 수 없다 B) Docker는 containerd를 내부적으로 사용하며, containerd는 독립적인 컨테이너 런타임이다 C) containerd는 Kubernetes 전용 런타임이다 D) Docker와 containerd는 동일한 프로젝트이다

정답: B

설명: Docker는 사용자 친화적인 CLI와 빌드 도구를 포함한 플랫폼으로, 내부적으로 containerd를 컨테이너 런타임으로 사용합니다. containerd는 CNCF 졸업 프로젝트로, Docker 없이 독립적으로 Kubernetes의 CRI(Container Runtime Interface)를 통해 직접 사용할 수 있습니다.

Q12. Pod에 리소스 requests와 limits를 설정하는 주된 이유는?

A) Pod의 네트워크 속도를 제한하기 위해 B) 스케줄러가 적합한 노드를 선택하고 노드 리소스 과점유를 방지하기 위해 C) 컨테이너 이미지 크기를 줄이기 위해 D) Service에 트래픽을 균등하게 분배하기 위해

정답: B

설명: requests는 kube-scheduler가 Pod를 배치할 노드를 선택할 때 기준이 됩니다. limits는 컨테이너가 사용할 수 있는 최대 리소스를 제한하여 노드 리소스 고갈을 방지합니다. CPU limit 초과 시 스로틀링, Memory limit 초과 시 OOMKilled가 발생합니다.

Q13. Labels와 Selectors에 대한 설명으로 올바른 것은?

A) Label은 기계가 읽기 위한 것이고 Annotation은 사람이 읽기 위한 것이다 B) Label은 Kubernetes 오브젝트에 붙이는 키-값 쌍으로, Selector를 통해 오브젝트 그룹을 선택하는 데 사용된다 C) Label은 한 오브젝트에 하나만 붙일 수 있다 D) Selector는 Namespace 간에도 동작한다

정답: B

설명: Label은 app: nginx, env: production 같은 키-값 쌍으로 Kubernetes 오브젝트에 붙입니다. Service, ReplicaSet 등은 Selector를 통해 특정 Label을 가진 Pod를 선택하여 관리합니다. Annotation은 Label과 달리 오브젝트 선택에 사용되지 않으며 비정형 메타데이터를 저장합니다.

Q14. DaemonSet의 특징으로 올바른 것은?

A) 특정 수의 Pod 복제본을 유지한다 B) 클러스터의 모든(혹은 일부) 노드에 정확히 하나의 Pod를 실행한다 C) 일회성 작업 실행에 사용된다 D) 상태를 가진 애플리케이션 배포에 최적화되어 있다

정답: B

설명: DaemonSet은 모든 노드(또는 nodeSelector로 지정된 노드)에 Pod 하나씩 실행되도록 보장합니다. 노드 모니터링 에이전트(Prometheus Node Exporter), 로그 수집기(Fluentd), 네트워크 플러그인(CNI) 같이 모든 노드에서 실행되어야 하는 시스템 데몬에 적합합니다.

Q15. StatefulSet이 Deployment와 다른 점은?

A) StatefulSet은 더 많은 복제본을 지원한다 B) StatefulSet은 안정적인 고유 네트워크 ID와 영속 스토리지를 각 Pod에 보장한다 C) StatefulSet은 롤링 업데이트를 지원하지 않는다 D) StatefulSet은 외부 트래픽을 직접 수신한다

정답: B

설명: StatefulSet은 각 Pod에 안정적인 고유 이름(pod-0, pod-1...)과 영속적인 스토리지(PersistentVolumeClaim)를 제공합니다. 데이터베이스(MySQL, PostgreSQL), 분산 메시지 브로커(Kafka) 같이 상태를 가진 애플리케이션에 적합합니다. Pod는 순서대로 시작되고 역순으로 종료됩니다.

Q16. Node Affinity와 nodeSelector의 차이점은?

A) nodeSelector는 Hard rule만 지원하고, Node Affinity는 Hard/Soft rule 모두 지원한다 B) Node Affinity는 구버전 기능이고 nodeSelector가 최신 기능이다 C) nodeSelector는 다수의 조건을 지원한다 D) 두 기능은 완전히 동일하다

정답: A

설명: nodeSelector는 간단한 key=value 매칭만 지원하며 반드시 일치해야 합니다. Node AffinityrequiredDuringSchedulingIgnoredDuringExecution(Hard, 반드시 만족), preferredDuringSchedulingIgnoredDuringExecution(Soft, 선호) 두 가지 규칙을 지원하며 복잡한 표현식(In, NotIn, Exists 등)을 사용할 수 있습니다.

Q17. Taints와 Tolerations의 동작 방식은?

A) Taint는 Pod에, Toleration은 Node에 적용한다 B) Node에 Taint를 설정하면 해당 Taint를 Tolerate하지 못하는 Pod는 그 노드에 스케줄링되지 않는다 C) Taint는 Pod를 특정 노드에 반드시 배치되도록 강제한다 D) Toleration은 Pod 간 네트워크 통신을 제한한다

정답: B

설명: Taint는 노드에 설정하며 kubectl taint nodes node1 key=value:NoSchedule 형태로 사용합니다. Taint가 있는 노드에는 해당 Taint를 Tolerate하는 Pod만 스케줄링됩니다. 반대로 Node Affinity는 Pod가 특정 노드를 선호/요구하는 개념입니다. Taint는 노드에서 원치 않는 Pod를 쫓아내고, Toleration은 Pod가 이를 허용하는 방식입니다.

Q18. Liveness Probe가 실패하면 어떤 동작이 발생하는가?

A) Pod가 즉시 삭제된다 B) 트래픽이 해당 Pod로 전송되지 않는다 C) 컨테이너가 재시작된다 D) Node가 격리된다

정답: C

설명: Liveness Probe는 애플리케이션이 살아있는지(alive) 검사합니다. 실패하면 kubelet이 해당 컨테이너를 재시작합니다. Readiness Probe 실패 시에는 Service의 엔드포인트에서 제거되어 트래픽이 전송되지 않지만 재시작하지는 않습니다.

Q19. HPA(Horizontal Pod Autoscaler)의 동작 방식은?

A) 기존 Pod의 CPU/메모리 리소스를 동적으로 늘린다 B) 메트릭 기반으로 Deployment의 replicas 수를 자동 조정한다 C) 새 노드를 자동으로 클러스터에 추가한다 D) Pod의 네트워크 대역폭을 자동 조정한다

정답: B

설명: HPA는 CPU 사용률, 메모리, 또는 커스텀 메트릭을 기반으로 Deployment나 StatefulSet의 Pod 복제본 수를 자동으로 증감합니다. VPA(Vertical Pod Autoscaler)는 개별 Pod의 리소스 요청/제한을 조정하고, Cluster Autoscaler는 노드 수를 조정합니다.

Q20. Rolling Update 전략에서 maxSurge와 maxUnavailable의 의미는?

A) maxSurge: 동시 삭제 가능한 Pod 수, maxUnavailable: 추가 생성 가능한 Pod 수 B) maxSurge: 업데이트 중 추가로 생성할 수 있는 Pod 수, maxUnavailable: 업데이트 중 이용 불가능할 수 있는 Pod 수 C) maxSurge: 최대 노드 수, maxUnavailable: 최소 노드 수 D) 두 파라미터는 StatefulSet에만 적용된다

정답: B

설명: Rolling Update 전략에서 maxSurge는 desired replicas 수를 초과하여 임시로 생성할 수 있는 Pod의 최대 수(절대값 또는 %)이고, maxUnavailable은 업데이트 중 이용 불가능한 상태로 있을 수 있는 Pod의 최대 수입니다. 이를 통해 무중단 배포가 가능합니다.

Q21. Job과 CronJob의 차이점은?

A) Job은 반복 실행, CronJob은 일회성 실행에 사용한다 B) Job은 일회성 작업 완료를 보장하고, CronJob은 스케줄에 따라 반복적으로 Job을 생성한다 C) CronJob은 Kubernetes에서 지원하지 않는다 D) 두 리소스는 동일한 기능을 한다

정답: B

설명: Job은 지정된 수의 Pod를 성공적으로 완료할 때까지 실행합니다(배치 작업, 데이터 처리 등). CronJob은 Linux의 crontab처럼 스케줄(0 2 * * * 형식)에 따라 주기적으로 Job 오브젝트를 생성하여 실행합니다(정기 보고서, 백업 등).

Q22. 12-Factor App의 원칙 중 "설정(Config)" 원칙의 핵심 내용은?

A) 설정을 코드에 하드코딩한다 B) 환경(dev/staging/prod)에 따라 달라지는 설정은 환경변수에 저장한다 C) 설정 파일을 코드 저장소에 커밋한다 D) 모든 설정을 데이터베이스에 저장한다

정답: B

설명: 12-Factor App의 Config 원칙은 설정(데이터베이스 URL, API 키 등 환경마다 달라지는 값)을 코드에서 분리하여 환경변수에 저장하도록 권장합니다. Kubernetes에서는 ConfigMap과 Secret이 이 원칙을 구현하는 수단입니다.

Q23. 마이크로서비스 아키텍처의 장점이 아닌 것은?

A) 서비스별 독립적인 배포와 확장 B) 기술 스택의 유연한 선택 C) 단순한 운영 복잡성 D) 장애 격리 (Fault Isolation)

정답: C

설명: 마이크로서비스는 서비스별 독립 배포, 개별 확장, 기술 다양성, 장애 격리 등의 장점이 있습니다. 그러나 서비스 간 통신(네트워크 레이턴시), 분산 트랜잭션, 서비스 디스커버리, 운영 복잡성 증가가 단점입니다. Monolith 대비 운영 복잡성이 높습니다.

Q24. Service Mesh가 제공하는 기능으로 올바르지 않은 것은?

A) 서비스 간 mTLS(상호 TLS) 암호화 B) 트래픽 관리 (카나리 배포, A/B 테스트) C) 분산 트레이싱 및 Observability D) 컨테이너 이미지 빌드 자동화

정답: D

설명: Service Mesh(Istio, Linkerd 등)는 애플리케이션 코드 변경 없이 서비스 간 통신에 mTLS, 트래픽 관리(가중치 기반 라우팅, 서킷 브레이커), 분산 트레이싱, Observability를 제공합니다. 컨테이너 이미지 빌드는 CI 파이프라인의 역할입니다.

Q25. Knative가 제공하는 주요 기능은?

A) Kubernetes 클러스터 프로비저닝 B) Kubernetes 위에서 서버리스 워크로드(이벤트 기반, 스케일-투-제로) 실행 C) 컨테이너 레지스트리 관리 D) 분산 데이터베이스 운영

정답: B

설명: Knative는 Kubernetes를 기반으로 서버리스 기능을 제공하는 CNCF 프로젝트입니다. Serving(HTTP 워크로드의 자동 스케일링, 스케일-투-제로)과 Eventing(이벤트 소스와 소비자를 연결하는 메시징 시스템)으로 구성됩니다.

Q26. GitOps의 핵심 원칙으로 올바른 것은?

A) 운영자가 직접 클러스터에 접속하여 kubectl로 변경한다 B) Git 저장소를 인프라 상태의 단일 진실 원천(Single Source of Truth)으로 사용하고, 자동화된 에이전트가 현재 상태를 Git 상태와 동기화한다 C) CI 파이프라인이 직접 프로덕션 클러스터에 배포한다 D) 인프라 변경은 수동 승인 없이 즉시 적용된다

정답: B

설명: GitOps는 모든 인프라와 애플리케이션 설정을 Git에 선언적으로 저장하고, ArgoCD나 Flux 같은 GitOps 에이전트가 클러스터 상태를 Git 상태와 지속적으로 동기화합니다. 변경은 Pull Request를 통해 Git에 반영되며, 감사 추적(audit trail)이 자동으로 생성됩니다.

Q27. ArgoCD의 주요 기능은?

A) 컨테이너 이미지 취약점 스캐닝 B) Git 저장소의 상태와 Kubernetes 클러스터를 지속적으로 동기화하는 GitOps CD 도구 C) Kubernetes 클러스터 모니터링 D) 시크릿 암호화 관리

정답: B

설명: ArgoCD는 CNCF 졸업 프로젝트로, Git 저장소(Helm charts, Kustomize, 일반 YAML)에 정의된 애플리케이션 상태와 Kubernetes 클러스터를 자동으로 동기화합니다. UI 대시보드를 통해 동기화 상태 확인, 수동 동기화, 롤백이 가능합니다.

Q28. Observability의 3가지 핵심 요소(Three Pillars)는?

A) CPU, Memory, Disk B) Metrics, Logs, Traces C) Deployment, Service, Ingress D) Build, Test, Deploy

정답: B

설명: 클라우드 네이티브 Observability의 3가지 핵심 요소(Three Pillars)는 Metrics(숫자 기반 시계열 데이터), Logs(이벤트 기반 텍스트 기록), Traces(분산 시스템에서 요청의 흐름 추적)입니다. OpenTelemetry는 이 세 가지를 통합하는 표준 프레임워크입니다.

Q29. Prometheus의 데이터 수집 방식은?

A) 애플리케이션이 Prometheus 서버로 데이터를 Push B) Prometheus 서버가 애플리케이션의 /metrics 엔드포인트에서 데이터를 Pull C) 메시지 브로커를 통해 비동기적으로 수집 D) 데이터베이스에서 주기적으로 쿼리

정답: B

설명: Prometheus는 기본적으로 Pull 방식을 사용합니다. 모니터링 대상(Target)의 /metrics HTTP 엔드포인트에서 주기적으로 메트릭을 스크래핑합니다. 단, 단명(short-lived) Job처럼 Pull이 어려운 경우 Pushgateway를 통한 Push 방식도 지원합니다.

Q30. OpenTelemetry의 목적은?

A) Kubernetes 클러스터 배포 자동화 B) Metrics, Logs, Traces를 수집하기 위한 벤더 중립적인 표준 API, SDK, 도구 제공 C) 컨테이너 이미지 레지스트리 표준화 D) 쿠버네티스 네트워크 정책 관리

정답: B

설명: OpenTelemetry(OTel)는 CNCF 프로젝트로, Observability 데이터(Metrics, Logs, Traces)를 생성, 수집, 내보내기 위한 벤더 중립적 표준입니다. 애플리케이션에 OTel SDK를 추가하면 Prometheus, Jaeger, Zipkin, Datadog 등 다양한 백엔드로 데이터를 내보낼 수 있습니다.

Q31. Jaeger의 주요 용도는?

A) 컨테이너 로그 집계 B) 분산 트레이싱(Distributed Tracing) - 마이크로서비스 간 요청 흐름 추적 C) CPU/메모리 메트릭 시각화 D) Kubernetes 클러스터 상태 모니터링

정답: B

설명: Jaeger는 CNCF 졸업 프로젝트로 분산 트레이싱 시스템입니다. 마이크로서비스 간 요청이 어떤 서비스를 거쳐 처리되는지 시각화하고 레이턴시 병목을 파악하는 데 사용됩니다. Zipkin과 유사한 기능을 제공합니다.

Q32. Grafana의 주요 기능은?

A) 컨테이너 이미지 취약점 스캐닝 B) 다양한 데이터 소스(Prometheus, Elasticsearch 등)의 메트릭을 시각화하는 대시보드 도구 C) CI/CD 파이프라인 실행 D) Kubernetes 롤링 업데이트 관리

정답: B

설명: Grafana는 Prometheus, InfluxDB, Elasticsearch, Loki 등 다양한 데이터 소스를 연결하여 메트릭, 로그, 트레이스를 시각화하는 오픈소스 대시보드 플랫폼입니다. AlertManager와 연동하여 알람 설정도 가능합니다.

Q33. Helm의 주요 용도는?

A) Kubernetes 클러스터 프로비저닝 B) Kubernetes 애플리케이션의 패키징, 배포, 관리를 위한 패키지 매니저 C) 컨테이너 이미지 빌드 도구 D) 노드 자동 스케일링

정답: B

설명: Helm은 Kubernetes의 패키지 매니저로, 애플리케이션과 관련된 여러 YAML 매니페스트를 Chart라는 단위로 패키징합니다. values.yaml을 통해 파라미터화된 배포가 가능하며, helm install, helm upgrade, helm rollback 명령으로 애플리케이션 생명주기를 관리합니다.

Q34. Kustomize와 Helm의 주요 차이점은?

A) Kustomize는 유료 도구이고 Helm은 무료이다 B) Kustomize는 템플릿 없이 오버레이(overlay) 방식으로 YAML을 커스터마이징하고, Helm은 Go 템플릿 기반 패키징을 사용한다 C) Kustomize는 Kubernetes에서 공식 지원하지 않는다 D) Helm은 멀티 클러스터 배포를 지원하지 않는다

정답: B

설명: Kustomize는 Kubernetes에 내장되어 있으며(kubectl apply -k), 기본 YAML을 수정하지 않고 오버레이를 통해 환경별 차이를 적용합니다. Helm은 Go 템플릿으로 YAML을 동적으로 생성하는 패키지 매니저입니다. 두 도구는 함께 사용하기도 합니다.

Q35. CI/CD 파이프라인에서 CD(Continuous Delivery)와 Continuous Deployment의 차이점은?

A) 두 용어는 완전히 동일하다 B) Continuous Delivery는 프로덕션 배포 전 수동 승인이 필요하고, Continuous Deployment는 자동으로 프로덕션까지 배포한다 C) Continuous Deployment는 스테이징 환경에만 자동 배포된다 D) Continuous Delivery는 코드를 자동으로 빌드하는 단계이다

정답: B

설명: **Continuous Integration(CI)**는 코드 변경을 자동으로 빌드/테스트하는 단계입니다. Continuous Delivery는 CI 이후 스테이징까지 자동 배포되지만 프로덕션은 수동 승인이 필요합니다. Continuous Deployment는 테스트 통과 후 프로덕션까지 자동으로 배포됩니다.

Q36. kube-proxy의 역할로 올바른 것은?

A) 컨테이너 이미지를 노드에 다운로드 B) 각 노드에서 Service의 네트워크 규칙(iptables/IPVS)을 관리하여 클러스터 내 트래픽을 Pod로 라우팅 C) Control Plane과 Worker Node 간 통신 암호화 D) 노드의 상태를 주기적으로 보고

정답: B

설명: kube-proxy는 각 노드에서 실행되며, Kubernetes Service 오브젝트가 생성/변경될 때 노드의 네트워크 규칙(기본적으로 iptables, 또는 IPVS)을 업데이트하여 ClusterIP로 들어오는 트래픽을 실제 Pod IP로 라우팅합니다.

Q37. Kubernetes에서 PersistentVolume(PV)과 PersistentVolumeClaim(PVC)의 관계는?

A) PVC는 PV를 생성하는 도구이다 B) PV는 클러스터 관리자가 프로비저닝한 스토리지이고, PVC는 사용자가 스토리지를 요청하는 리소스이다 C) PV와 PVC는 항상 같은 Namespace에 있어야 한다 D) PVC는 임시 스토리지에만 사용된다

정답: B

설명: PersistentVolume(PV)은 클러스터 관리자가 프로비저닝한 실제 스토리지 리소스입니다. PersistentVolumeClaim(PVC)은 사용자가 스토리지를 요청하는 오브젝트로, 용량과 AccessMode를 지정합니다. PVC와 PV는 바인딩(binding)되어 Pod에 마운트됩니다. StorageClass를 통해 동적 프로비저닝도 가능합니다.

Q38. Ingress 리소스의 역할은?

A) Pod 간 내부 통신을 관리 B) 클러스터 외부에서 HTTP/HTTPS 트래픽을 Service로 라우팅하는 규칙 정의 C) 노드 간 네트워크 암호화 D) 스토리지 접근 제어

정답: B

설명: Ingress는 HTTP/HTTPS 외부 요청을 클러스터 내 Service로 라우팅하는 규칙을 정의합니다. 호스트명 기반(app.example.com), 경로 기반(/api, /web) 라우팅, TLS 터미네이션을 지원합니다. 실제 동작은 Nginx, Traefik, Envoy 등의 Ingress Controller가 수행합니다.

Q39. CNCF(Cloud Native Computing Foundation)의 역할은?

A) 클라우드 인프라를 직접 운영하는 조직 B) 클라우드 네이티브 기술의 오픈소스 프로젝트를 관리하고 생태계를 발전시키는 Linux Foundation 산하 비영리 재단 C) Kubernetes를 만든 회사 D) AWS, GCP, Azure의 연합 단체

정답: B

설명: CNCF(Cloud Native Computing Foundation)는 Linux Foundation 산하 비영리 조직으로, Kubernetes, Prometheus, Envoy, Containerd, Argo CD 등 클라우드 네이티브 오픈소스 프로젝트를 중립적으로 관리합니다. Sandbox → Incubating → Graduated 단계로 프로젝트 성숙도를 관리합니다.

Q40. Kubernetes에서 ServiceAccount의 용도는?

A) 사람이 클러스터에 로그인하는 계정 B) Pod가 Kubernetes API를 호출할 때 사용하는 인증 ID C) 노드 간 인증에 사용되는 계정 D) Ingress 접근 제어에 사용되는 계정

정답: B

설명: ServiceAccount는 Pod(애플리케이션)가 Kubernetes API에 접근할 때 사용하는 신원(identity)입니다. 생성 시 토큰이 자동으로 부여되며, RBAC를 통해 필요한 권한만 부여합니다. 사람의 접근에는 User 또는 Group을 사용합니다.

Q41. Container 이미지 레이어(Layer)에 대한 설명으로 올바른 것은?

A) 각 RUN 명령은 새 레이어를 생성하며, 레이어는 불변이고 재사용된다 B) 컨테이너 이미지는 단 하나의 레이어로 구성된다 C) 레이어는 런타임에 동적으로 변경된다 D) 이미지 레이어는 Kubernetes Node에서만 캐싱된다

정답: A

설명: Docker/OCI 이미지는 여러 불변 레이어의 스택으로 구성됩니다. Dockerfile의 FROM, RUN, COPY 등 각 명령이 새 레이어를 생성합니다. 동일한 레이어는 여러 이미지에서 공유(재사용)되어 스토리지를 절약합니다. 컨테이너 실행 시 읽기-쓰기 레이어가 최상단에 추가됩니다.

Q42. Cloud Native에서 "Immutable Infrastructure"의 의미는?

A) 서버를 절대 삭제하지 않는 정책 B) 배포된 인프라를 수정하지 않고, 변경이 필요할 때 새 인스턴스를 생성하여 교체하는 방식 C) 데이터를 변경할 수 없도록 잠금 D) 인프라 코드를 읽기 전용으로 유지

정답: B

설명: Immutable Infrastructure는 일단 배포된 서버나 컨테이너를 직접 수정하지 않고, 변경이 필요할 때 새 이미지를 빌드하여 새 인스턴스로 교체합니다. 이는 "설정 드리프트(configuration drift)"를 방지하고 일관성을 보장합니다. Kubernetes의 컨테이너 모델이 이 원칙을 따릅니다.

Q43. KEDA(Kubernetes Event-Driven Autoscaler)의 특징은?

A) CPU/메모리 기반으로만 스케일링한다 B) 메시지 큐 깊이, 이벤트 수 등 외부 이벤트 소스를 기반으로 Pod를 0부터 자동 스케일링한다 C) 클러스터 노드 수를 자동 조정한다 D) VPA와 동일한 기능을 수행한다

정답: B

설명: KEDA(Kubernetes Event Driven Autoscaling)는 CNCF 졸업 프로젝트로, Kafka 토픽 메시지 수, RabbitMQ 큐 깊이, Azure Service Bus, AWS SQS 등 60개 이상의 스케일러를 지원하여 이벤트 기반으로 Pod를 0에서 N까지 자동 스케일링합니다. 표준 HPA를 확장합니다.

Q44. Kubernetes에서 NetworkPolicy의 기본 동작은?

A) 기본적으로 모든 Pod 간 트래픽이 차단된다 B) NetworkPolicy가 없으면 모든 Pod 간 트래픽이 허용된다 C) NetworkPolicy는 Control Plane 컴포넌트 간 통신만 제어한다 D) NetworkPolicy는 외부 인터넷 트래픽만 제어한다

정답: B

설명: Kubernetes는 기본적으로 "open by default" 정책으로, NetworkPolicy 오브젝트가 없으면 모든 Pod 간 트래픽이 허용됩니다. NetworkPolicy를 적용하면 해당 Pod에 대한 Ingress/Egress 트래픽을 화이트리스트 방식으로 제한할 수 있습니다. NetworkPolicy 구현은 CNI 플러그인(Calico, Cilium 등)이 담당합니다.

Q45. Secret 오브젝트에 저장된 데이터는 기본적으로 어떻게 저장되는가?

A) AES-256으로 암호화되어 저장 B) Base64로 인코딩되어 etcd에 저장 (암호화 아님) C) SHA-256 해시로 저장 D) 평문으로 저장

정답: B

설명: Kubernetes Secret에 저장된 데이터는 기본적으로 base64로 인코딩되어 etcd에 저장됩니다. Base64는 인코딩이지 암호화가 아닙니다. 보안을 위해 etcd의 Encryption at Rest를 활성화하거나, HashiCorp Vault, External Secrets Operator 같은 외부 시크릿 관리 도구를 사용하는 것이 권장됩니다.

Q46. Kubernetes의 etcd에 대한 설명으로 올바른 것은?

A) etcd는 Worker Node에서 실행된다 B) etcd는 분산 키-값 스토어로 Raft 합의 알고리즘을 사용하며, 홀수 개의 인스턴스(3, 5, 7)를 권장한다 C) etcd는 컨테이너 이미지를 저장한다 D) etcd 데이터는 메모리에만 저장되어 재시작 시 초기화된다

정답: B

설명: etcd는 Control Plane의 분산 키-값 스토어로, 모든 Kubernetes 클러스터 상태를 영속적으로 저장합니다. Raft 합의 알고리즘을 사용하여 데이터 일관성을 보장합니다. 고가용성을 위해 3, 5, 7개(홀수)의 인스턴스가 권장됩니다. etcd의 데이터 손실은 클러스터 전체 손실을 의미하므로 정기 백업이 필수입니다.

Q47. Pod의 restartPolicy 옵션으로 올바르지 않은 것은?

A) Always B) OnFailure C) Never D) OnSuccess

정답: D

설명: Pod의 restartPolicyAlways(기본값, 항상 재시작), OnFailure(실패 시에만 재시작), Never(재시작하지 않음) 세 가지입니다. OnSuccess는 존재하지 않는 옵션입니다. Job에는 OnFailure 또는 Never를 사용하고, Deployment에는 Always가 강제됩니다.

Q48. Kubernetes 클러스터에서 CoreDNS의 역할은?

A) 컨테이너 이미지 캐싱 B) 클러스터 내 서비스 디스커버리를 위한 DNS 서버 역할 C) 노드 간 네트워크 암호화 D) Ingress 트래픽 로드밸런싱

정답: B

설명: CoreDNS는 Kubernetes 클러스터의 기본 DNS 서버입니다. Service 이름으로 DNS 쿼리를 할 수 있게 하여 서비스 디스커버리를 지원합니다. 예를 들어 my-service.my-namespace.svc.cluster.local 형식으로 서비스를 찾을 수 있습니다.

Q49. 다음 중 Kubernetes Control Plane 컴포넌트가 아닌 것은?

A) kube-apiserver B) kube-scheduler C) kubelet D) kube-controller-manager

정답: C

설명: kubelet은 Worker Node 컴포넌트입니다. Control Plane 컴포넌트는 kube-apiserver, etcd, kube-scheduler, kube-controller-manager(및 고가용성 환경의 cloud-controller-manager)입니다. kubelet은 모든 노드(Control Plane 노드 포함)에서 실행될 수 있지만 Worker Node의 핵심 컴포넌트입니다.

Q50. Kubernetes에서 ConfigMap을 Pod에 주입하는 방법으로 올바르지 않은 것은?

A) 환경변수로 주입 (envFrom) B) 볼륨으로 마운트 C) 직접 Pod 이미지에 빌드 D) 개별 환경변수로 주입 (env.valueFrom)

정답: C

설명: ConfigMap을 Pod에 주입하는 방법은 환경변수(envFrom.configMapRef로 전체, 또는 env.valueFrom.configMapKeyRef로 개별 키), 볼륨 마운트(파일로 마운트)입니다. 이미지에 직접 빌드하는 것은 Immutable Infrastructure 원칙에 위배되며 ConfigMap의 목적(런타임 설정 분리)에 맞지 않습니다.

Q51. Service의 ExternalName 타입은 어떤 경우에 사용하는가?

A) 외부 IP를 클러스터 내 Service로 노출 B) 클러스터 내부에서 외부 DNS 이름을 Service 이름으로 추상화(CNAME 역할) C) 모든 노드의 포트를 외부에 오픈 D) 클라우드 제공업체의 로드밸런서 프로비저닝

정답: B

설명: ExternalName Service는 클러스터 내부에서 외부 DNS 이름(예: my-external-db.example.com)에 대한 CNAME 레코드를 생성합니다. 내부 서비스가 외부 서비스를 추상화된 이름으로 접근할 수 있어, 외부 엔드포인트가 변경되어도 Service 이름은 유지됩니다.

Q52. Kubernetes에서 init container의 특징은?

A) 애플리케이션 컨테이너와 동시에 시작된다 B) 메인 컨테이너보다 먼저 순차적으로 실행되며, 완료되어야 메인 컨테이너가 시작된다 C) 백그라운드에서 지속적으로 실행된다 D) 노드 초기화에만 사용된다

정답: B

설명: init container는 메인 컨테이너(app container)가 시작되기 전에 실행되는 특수 컨테이너입니다. 여러 init container가 있으면 순차적으로 실행되며, 각각 완료(exit 0)되어야 다음 것이 실행됩니다. 데이터베이스 준비 대기, 설정 파일 생성, 의존성 다운로드 등에 활용됩니다.

Q53. Helm Chart의 구조에서 values.yaml의 역할은?

A) Chart의 버전과 의존성 정보를 정의 B) 차트의 기본 설정값을 정의하며, 배포 시 override 가능 C) 배포할 Kubernetes 리소스 템플릿을 포함 D) 차트의 사용법을 문서화

정답: B

설명: Helm Chart 구조에서 values.yaml은 차트의 기본값을 정의합니다. helm install이나 helm upgrade--set key=value 또는 -f custom-values.yaml로 값을 override할 수 있습니다. Chart.yaml은 차트 메타데이터, templates/ 디렉토리는 Kubernetes 리소스 템플릿을 포함합니다.

Q54. 다음 중 Cloud Native Computing Foundation(CNCF)의 Graduated 프로젝트가 아닌 것은?

A) Kubernetes B) Prometheus C) Terraform D) Argo

정답: C

설명: Terraform은 HashiCorp의 인프라 프로비저닝 도구로 CNCF 프로젝트가 아닙니다(현재 BSL 라이선스). CNCF Graduated 프로젝트에는 Kubernetes, Prometheus, Envoy, CoreDNS, containerd, Argo, Flux, Jaeger, Vitess 등이 있습니다.

Q55. Pod Security Context에서 runAsNonRoot: true 설정의 의미는?

A) Pod를 특권(privileged) 모드로 실행 B) 컨테이너가 root 사용자(UID 0)로 실행되는 것을 금지 C) 컨테이너 내부의 파일시스템을 읽기 전용으로 설정 D) 컨테이너의 네트워크 접근을 제한

정답: B

설명: runAsNonRoot: true는 컨테이너가 root(UID 0)로 실행되면 시작을 거부합니다. 이미지에 root가 아닌 사용자가 설정되어 있어야 합니다. 컨테이너 이스케이프 공격에서 root 권한 획득을 방지하는 중요한 보안 설정입니다. runAsUser: 1000과 함께 사용하는 것이 일반적입니다.

Q56. Readiness Probe가 실패한 Pod는 어떻게 되는가?

A) 컨테이너가 재시작된다 B) Pod가 삭제된다 C) Service의 엔드포인트에서 제거되어 트래픽을 받지 않는다 D) 노드가 격리된다

정답: C

설명: Readiness Probe는 컨테이너가 트래픽을 처리할 준비가 되었는지 확인합니다. 실패하면 해당 Pod는 Service의 엔드포인트(Endpoints 오브젝트)에서 제거되어 트래픽을 받지 않습니다. 재시작은 발생하지 않습니다. 애플리케이션 시작 시간이 길거나 일시적 과부하 상태에서 유용합니다.

Q57. Kubernetes의 Namespace에 대한 설명으로 올바르지 않은 것은?

A) kube-system Namespace에는 Kubernetes 시스템 컴포넌트가 실행된다 B) Namespace는 클러스터 수준 리소스(Node, PersistentVolume)를 격리한다 C) ResourceQuota로 Namespace별 리소스 사용량을 제한할 수 있다 D) default Namespace는 별도 Namespace를 지정하지 않은 리소스가 생성되는 곳이다

정답: B

설명: Namespace는 Pod, Deployment, Service 같은 네임스페이스 수준 리소스를 격리합니다. Node, PersistentVolume, StorageClass, ClusterRole 같은 클러스터 수준 리소스는 Namespace에 속하지 않습니다. ResourceQuota와 LimitRange를 통해 Namespace별 리소스 사용량 제한이 가능합니다.

Q58. Kubernetes에서 Deployment를 이전 버전으로 롤백하는 명령어는?

A) kubectl restart deployment my-app B) kubectl rollout undo deployment/my-app C) kubectl revert deployment my-app D) kubectl restore deployment my-app

정답: B

설명: kubectl rollout undo deployment/my-app으로 이전 ReplicaSet으로 롤백합니다. kubectl rollout history deployment/my-app으로 이력을 확인하고, --to-revision=2로 특정 버전으로 롤백할 수 있습니다. kubectl rollout status로 롤아웃/롤백 진행 상황을 실시간으로 모니터링합니다.

Q59. Cloud Native 아키텍처에서 "서킷 브레이커(Circuit Breaker)" 패턴의 목적은?

A) 전기 회로 보호 B) 실패하는 서비스에 대한 요청을 차단하여 연쇄 장애(Cascading Failure)를 방지 C) 네트워크 트래픽을 암호화 D) 데이터베이스 연결 풀 관리

정답: B

설명: 서킷 브레이커 패턴은 마이크로서비스에서 특정 서비스가 반복적으로 실패할 때, 해당 서비스로의 요청을 즉시 실패 처리하여 전체 시스템으로의 장애 전파를 막습니다. Istio, Envoy, Resilience4j 등에서 구현됩니다. Closed(정상) → Open(차단) → Half-Open(테스트) 세 상태를 가집니다.

Q60. Kubernetes에서 Horizontal Pod Autoscaler(HPA)가 동작하기 위한 전제 조건은?

A) Cluster Autoscaler가 반드시 설치되어 있어야 한다 B) Pod에 리소스 requests가 설정되어 있어야 하고 Metrics Server(또는 커스텀 메트릭 서버)가 실행 중이어야 한다 C) StatefulSet에만 적용 가능하다 D) 최소 3개 이상의 노드가 있어야 한다

정답: B

설명: HPA가 CPU 기반으로 동작하려면 두 가지 조건이 필요합니다. 1) 대상 Pod에 CPU requests가 설정되어 있어야 합니다(현재 사용률 = 실제 사용 / requests). 2) Metrics Server가 클러스터에 배포되어 있어야 메트릭을 수집할 수 있습니다. 커스텀 메트릭(KEDA)은 별도 어댑터가 필요합니다.

KCNA Kubernetes and Cloud Native Associate Practice Exam: 60 Questions

1. Exam Overview

KCNA (Kubernetes and Cloud Native Associate) is an entry-level certification offered by the CNCF (Cloud Native Computing Foundation).

ItemDetails
Duration90 minutes
Questions60 (multiple choice)
Passing Score75% (45 or more correct)
FormatOnline proctored
Validity3 years
CostUSD 250

2. The Kubestronaut Program

Kubestronaut is an honorary title awarded by CNCF to individuals who hold all five Kubernetes certifications.

CertificationTypePassing Score
KCNATheory (MCQ)75%
KCSATheory (MCQ)75%
CKAPerformance-based66%
CKADPerformance-based66%
CKSPerformance-based67%

3. Domain Breakdown

DomainWeight
Kubernetes Fundamentals46%
Container Orchestration22%
Cloud Native Architecture16%
Cloud Native Observability8%
Cloud Native Application Delivery8%

4. Key Concepts Summary

Kubernetes Architecture

Control Plane Components:

  • kube-apiserver: Sole entry point for the cluster, serves REST API
  • etcd: Distributed key-value store for all cluster state
  • kube-scheduler: Assigns newly created Pods to nodes
  • kube-controller-manager: Runs controller loops for Deployments, ReplicaSets, etc.

Worker Node Components:

  • kubelet: Manages Pod lifecycle on each node
  • kube-proxy: Manages network rules (iptables/IPVS) for Services
  • Container Runtime: containerd, CRI-O, etc. (OCI-compliant)

Core Cloud Native Principles

  • 12-Factor App: Methodology for modern cloud application development (codebase, dependencies, config, etc.)
  • GitOps: Declarative infrastructure management using Git as the single source of truth
  • Service Mesh: Handles inter-service communication at the infrastructure layer (mTLS, traffic management)

5. Practice Questions (60 Questions)

Q1. Which Control Plane component stores all cluster state (configuration, metadata)?

A) kube-apiserver B) etcd C) kube-scheduler D) kube-controller-manager

Answer: B

Explanation: etcd is Kubernetes' distributed key-value store that persistently stores all cluster state and configuration data. Only kube-apiserver directly communicates with etcd.

Q2. Which Control Plane component decides which Worker Node a newly created Pod should be placed on?

A) kubelet B) kube-proxy C) kube-scheduler D) kube-controller-manager

Answer: C

Explanation: kube-scheduler detects newly created Pods that have not yet been assigned to a node and selects the optimal node based on resource requirements, nodeSelector, affinity rules, and other criteria.

Q3. What is the primary role of the kubelet?

A) Managing cluster network policies B) Managing Pod and container lifecycle on each Worker Node C) Authenticating and authorizing API requests D) Storing cluster state data

Answer: B

Explanation: kubelet runs on each Worker Node and manages containers by receiving PodSpecs from kube-apiserver and ensuring the described containers are running and healthy. It communicates with the container runtime to start and stop containers.

Q4. What is the smallest deployable unit in Kubernetes?

A) Container B) Pod C) ReplicaSet D) Node

Answer: B

Explanation: A Pod is the smallest deployable unit in Kubernetes. It contains one or more containers that share a network namespace and storage. Containers within the same Pod communicate via localhost.

Q5. Which component maintains the desired number of Pod replicas for a Deployment?

A) kube-scheduler B) DaemonSet C) ReplicaSet D) StatefulSet

Answer: C

Explanation: A ReplicaSet ensures that a specified number of Pod replicas are running at all times. A Deployment manages ReplicaSets to provide declarative updates and rollback functionality.

Q6. Which Service type is only accessible from within the cluster?

A) NodePort B) LoadBalancer C) ClusterIP D) ExternalName

Answer: C

Explanation: ClusterIP is the default Service type that assigns a virtual IP accessible only within the cluster. NodePort exposes a port on each node for external access, while LoadBalancer provisions a cloud provider's load balancer.

Q7. Which resource is used to logically isolate multiple Kubernetes resources?

A) Label B) Annotation C) Namespace D) ConfigMap

Answer: C

Explanation: Namespaces provide a logical isolation mechanism within a single cluster. They are used for team separation or environment isolation (dev/staging/prod). Default namespaces include: default, kube-system, and kube-public.

Q8. Which Kubernetes resource stores non-sensitive application configuration data?

A) Secret B) ConfigMap C) PersistentVolume D) ServiceAccount

Answer: B

Explanation: ConfigMap stores non-sensitive configuration data as key-value pairs. It can be injected into Pods via environment variables or volume mounts. For sensitive data (passwords, tokens), Secret should be used.

Q9. What best describes the Declarative approach in the Kubernetes API?

A) Issue step-by-step commands for actions to perform B) Define the desired final state and the system converges to that state C) Directly manipulate resources via commands D) Query-only mode for reading current state

Answer: B

Explanation: The declarative approach (e.g., kubectl apply -f manifest.yaml) defines the desired final state in YAML/JSON. Kubernetes compares the current state with the desired state and reconciles them. The imperative approach (e.g., kubectl create deployment) instructs immediate actions.

Q10. Which of the following is NOT part of the OCI (Open Container Initiative) specifications?

A) Image Specification B) Runtime Specification C) Distribution Specification D) Orchestration Specification

Answer: D

Explanation: OCI defines three specifications: Image Spec (image format), Runtime Spec (container execution), and Distribution Spec (registry distribution protocol). Orchestration is not part of OCI specs — it belongs to tools like Kubernetes.

Q11. What is the relationship between containerd and Docker?

A) containerd cannot fully replace Docker B) Docker uses containerd internally, and containerd is an independent container runtime C) containerd is a Kubernetes-only runtime D) Docker and containerd are the same project

Answer: B

Explanation: Docker is a user-friendly platform with CLI and build tools that uses containerd as its underlying container runtime. containerd is a CNCF graduated project that can be used directly with Kubernetes via CRI (Container Runtime Interface) without Docker.

Q12. What is the main reason for setting resource requests and limits on Pods?

A) To limit Pod network speed B) To help the scheduler select appropriate nodes and prevent node resource exhaustion C) To reduce container image size D) To distribute traffic evenly to Services

Answer: B

Explanation: requests serve as the basis for kube-scheduler to select a node. limits restrict the maximum resources a container can use, preventing node resource exhaustion. Exceeding CPU limits causes throttling; exceeding memory limits causes OOMKilled.

Q13. Which statement about Labels and Selectors is correct?

A) Labels are for machines and Annotations are for humans B) Labels are key-value pairs attached to Kubernetes objects, used with Selectors to select groups of objects C) Only one Label can be attached to an object D) Selectors work across Namespaces

Answer: B

Explanation: Labels are key-value pairs like app: nginx or env: production. Services, ReplicaSets, and other resources use Selectors to target Pods with specific Labels. Annotations, unlike Labels, are not used for object selection and store unstructured metadata.

Q14. What is a characteristic of a DaemonSet?

A) Maintains a specified number of Pod replicas B) Runs exactly one Pod on all (or a subset of) nodes in the cluster C) Used for one-time task execution D) Optimized for stateful application deployments

Answer: B

Explanation: A DaemonSet ensures that a Pod runs on every node (or nodes matching a nodeSelector). It is ideal for system daemons that must run on all nodes, such as monitoring agents (Prometheus Node Exporter), log collectors (Fluentd), and network plugins (CNI).

Q15. How does a StatefulSet differ from a Deployment?

A) StatefulSet supports more replicas B) StatefulSet guarantees stable unique network identity and persistent storage for each Pod C) StatefulSet does not support rolling updates D) StatefulSet directly receives external traffic

Answer: B

Explanation: StatefulSet provides each Pod with a stable unique name (pod-0, pod-1...) and persistent storage (PersistentVolumeClaim). It is suited for stateful applications like databases (MySQL, PostgreSQL) and distributed message brokers (Kafka). Pods are started in order and terminated in reverse.

Q16. What is the difference between Node Affinity and nodeSelector?

A) nodeSelector only supports hard rules; Node Affinity supports both hard and soft rules B) Node Affinity is older and nodeSelector is the newer feature C) nodeSelector supports multiple conditions D) The two features are identical

Answer: A

Explanation: nodeSelector only supports simple key=value matching and is always a hard requirement. Node Affinity supports requiredDuringSchedulingIgnoredDuringExecution (hard rule) and preferredDuringSchedulingIgnoredDuringExecution (soft/preferred rule), and allows complex expressions (In, NotIn, Exists, etc.).

Q17. How do Taints and Tolerations work?

A) Taints are applied to Pods and Tolerations to Nodes B) A Taint on a Node prevents Pods that do not Tolerate it from being scheduled there C) Taints force Pods to be placed on specific nodes D) Tolerations restrict network communication between Pods

Answer: B

Explanation: A Taint is set on a node (e.g., kubectl taint nodes node1 key=value:NoSchedule). Only Pods with a matching Toleration can be scheduled on a tainted node. Node Affinity is about Pods preferring/requiring certain nodes. Taints repel unwanted Pods from nodes; Tolerations allow Pods to accept those taints.

Q18. What happens when a Liveness Probe fails?

A) The Pod is immediately deleted B) Traffic is no longer sent to that Pod C) The container is restarted D) The Node is cordoned

Answer: C

Explanation: A Liveness Probe checks whether the application is alive. If it fails, kubelet restarts the container. A Readiness Probe failure removes the Pod from Service endpoints (no traffic), but does not restart the container.

Q19. How does the HPA (Horizontal Pod Autoscaler) work?

A) Dynamically increases CPU/memory resources for existing Pods B) Automatically adjusts the number of replicas in a Deployment based on metrics C) Automatically adds new nodes to the cluster D) Automatically adjusts Pod network bandwidth

Answer: B

Explanation: HPA automatically scales the number of Pod replicas in a Deployment or StatefulSet based on CPU utilization, memory, or custom metrics. VPA (Vertical Pod Autoscaler) adjusts resource requests/limits for individual Pods, while Cluster Autoscaler adjusts the node count.

Q20. In a Rolling Update strategy, what do maxSurge and maxUnavailable mean?

A) maxSurge: max Pods to delete at once; maxUnavailable: max additional Pods to create B) maxSurge: max additional Pods that can be created above desired count; maxUnavailable: max Pods that can be unavailable during update C) maxSurge: maximum node count; maxUnavailable: minimum node count D) Both parameters only apply to StatefulSets

Answer: B

Explanation: In a Rolling Update, maxSurge is the maximum number (absolute or %) of Pods that can be created above the desired replica count. maxUnavailable is the maximum number of Pods that can be in an unavailable state during the update. This enables zero-downtime deployments.

Q21. What is the difference between a Job and a CronJob?

A) Job is for repeated execution; CronJob is for one-time execution B) Job guarantees completion of a one-time task; CronJob creates Jobs on a schedule C) CronJob is not supported in Kubernetes D) Both resources provide the same functionality

Answer: B

Explanation: A Job runs Pods until a specified number complete successfully (batch processing, data migration, etc.). A CronJob creates Job objects on a schedule (like Linux crontab, e.g., 0 2 * * *) for periodic tasks like reports or backups.

Q22. What is the core idea of the "Config" factor in the 12-Factor App?

A) Hard-code configuration in the application code B) Store configuration that varies between environments in environment variables C) Commit configuration files to the source repository D) Store all configuration in a database

Answer: B

Explanation: The 12-Factor Config principle requires storing environment-varying configuration (database URLs, API keys, etc.) in environment variables, separate from code. In Kubernetes, ConfigMaps and Secrets implement this principle.

Q23. Which is NOT an advantage of microservices architecture?

A) Independent deployment and scaling per service B) Flexibility in technology stack choices C) Simple operational complexity D) Fault isolation

Answer: C

Explanation: Microservices offer independent deployment, per-service scaling, technology diversity, and fault isolation. However, they introduce increased operational complexity compared to monoliths — inter-service network latency, distributed transactions, service discovery challenges, and more.

Q24. Which feature is NOT provided by a Service Mesh?

A) mTLS (mutual TLS) encryption between services B) Traffic management (canary deployments, A/B testing) C) Distributed tracing and observability D) Automated container image building

Answer: D

Explanation: Service Meshes (Istio, Linkerd, etc.) provide mTLS, traffic management (weighted routing, circuit breaking), distributed tracing, and observability without application code changes. Container image building is the responsibility of CI pipelines, not service meshes.

Q25. What is the primary capability of Knative?

A) Kubernetes cluster provisioning B) Running serverless workloads (event-driven, scale-to-zero) on top of Kubernetes C) Container registry management D) Distributed database operations

Answer: B

Explanation: Knative is a CNCF project that brings serverless capabilities to Kubernetes. It consists of Serving (auto-scaling HTTP workloads, including scale-to-zero) and Eventing (messaging system connecting event sources and consumers).

Q26. What is a core principle of GitOps?

A) Operators directly access the cluster and apply changes with kubectl B) Git is the single source of truth for infrastructure state; automated agents sync the cluster to match Git C) CI pipelines deploy directly to production clusters D) Infrastructure changes are applied immediately without manual approval

Answer: B

Explanation: GitOps stores all infrastructure and application configuration declaratively in Git. GitOps agents like ArgoCD or Flux continuously synchronize the cluster state to match the Git state. Changes are made via Pull Requests, automatically creating an audit trail.

Q27. What is the main function of ArgoCD?

A) Container image vulnerability scanning B) A GitOps CD tool that continuously syncs a Kubernetes cluster to match a Git repository C) Kubernetes cluster monitoring D) Secret encryption management

Answer: B

Explanation: ArgoCD is a CNCF graduated project that automatically synchronizes Kubernetes cluster state with application definitions stored in Git (Helm charts, Kustomize, raw YAML). It provides a UI dashboard for checking sync status, manual syncing, and rollback.

Q28. What are the Three Pillars of Observability?

A) CPU, Memory, Disk B) Metrics, Logs, Traces C) Deployment, Service, Ingress D) Build, Test, Deploy

Answer: B

Explanation: The three pillars of cloud native observability are Metrics (numeric time-series data), Logs (event-based text records), and Traces (tracking request flows across distributed systems). OpenTelemetry is the unified framework for all three.

Q29. What is Prometheus' data collection method?

A) Applications push data to the Prometheus server B) Prometheus server pulls data from each application's /metrics endpoint C) Data is collected asynchronously via a message broker D) Data is periodically queried from a database

Answer: B

Explanation: Prometheus primarily uses a pull model, scraping metrics from the /metrics HTTP endpoint of monitoring targets at regular intervals. For short-lived jobs where pull is impractical, a Pushgateway allows push-based collection.

Q30. What is the purpose of OpenTelemetry?

A) Automating Kubernetes cluster deployments B) Providing vendor-neutral standard APIs, SDKs, and tools for collecting Metrics, Logs, and Traces C) Standardizing container image registries D) Managing Kubernetes network policies

Answer: B

Explanation: OpenTelemetry (OTel) is a CNCF project providing a vendor-neutral standard for generating, collecting, and exporting observability data (Metrics, Logs, Traces). Adding the OTel SDK to applications allows exporting data to various backends like Prometheus, Jaeger, Zipkin, and Datadog.

Q31. What is Jaeger primarily used for?

A) Aggregating container logs B) Distributed Tracing — tracking request flows across microservices C) Visualizing CPU/memory metrics D) Kubernetes cluster state monitoring

Answer: B

Explanation: Jaeger is a CNCF graduated distributed tracing system. It visualizes how requests flow through services in a microservices architecture and helps identify latency bottlenecks. It provides similar functionality to Zipkin.

Q32. What is Grafana primarily used for?

A) Container image vulnerability scanning B) A dashboard tool for visualizing metrics from various data sources (Prometheus, Elasticsearch, etc.) C) Running CI/CD pipelines D) Managing Kubernetes rolling updates

Answer: B

Explanation: Grafana is an open-source dashboard platform that connects to multiple data sources (Prometheus, InfluxDB, Elasticsearch, Loki, etc.) to visualize metrics, logs, and traces. It also supports alert configuration with AlertManager.

Q33. What is Helm primarily used for?

A) Kubernetes cluster provisioning B) A package manager for packaging, deploying, and managing Kubernetes applications C) Container image build tool D) Node autoscaling

Answer: B

Explanation: Helm is Kubernetes' package manager. It packages multiple related YAML manifests into a Chart. Parameterized deployments are possible via values.yaml, and application lifecycle is managed with helm install, helm upgrade, and helm rollback commands.

Q34. What is the main difference between Kustomize and Helm?

A) Kustomize is paid and Helm is free B) Kustomize customizes YAML via overlays without templates; Helm uses Go template-based packaging C) Kustomize is not officially supported by Kubernetes D) Helm does not support multi-cluster deployments

Answer: B

Explanation: Kustomize is built into Kubernetes (kubectl apply -k). It applies environment-specific differences through overlays without modifying base YAML files. Helm uses Go templates to dynamically generate YAML as a package manager. Both tools are often used together.

Q35. What is the difference between Continuous Delivery and Continuous Deployment?

A) The two terms are identical B) Continuous Delivery requires manual approval before production; Continuous Deployment automatically deploys all the way to production C) Continuous Deployment only auto-deploys to staging environments D) Continuous Delivery is the stage that automatically builds code

Answer: B

Explanation: Continuous Integration (CI) automatically builds and tests code changes. Continuous Delivery auto-deploys to staging but requires manual approval for production. Continuous Deployment automatically deploys all the way to production after tests pass.

Q36. What is the role of kube-proxy?

A) Downloading container images to nodes B) Managing network rules (iptables/IPVS) on each node to route cluster traffic to Pods C) Encrypting communication between Control Plane and Worker Nodes D) Periodically reporting node status

Answer: B

Explanation: kube-proxy runs on each node and updates the node's network rules (iptables by default, or IPVS) when Kubernetes Service objects are created or modified, routing traffic incoming to ClusterIPs to actual Pod IPs.

Q37. What is the relationship between PersistentVolume (PV) and PersistentVolumeClaim (PVC)?

A) PVC is a tool for creating PVs B) PV is storage provisioned by cluster admins; PVC is a resource through which users request storage C) PV and PVC must always be in the same Namespace D) PVC is only used for temporary storage

Answer: B

Explanation: A PersistentVolume (PV) is an actual storage resource provisioned by a cluster administrator. A PersistentVolumeClaim (PVC) is an object through which users request storage by specifying capacity and AccessMode. PVCs bind to PVs and are mounted into Pods. Dynamic provisioning via StorageClass is also supported.

Q38. What is the role of an Ingress resource?

A) Managing internal Pod-to-Pod communication B) Defining rules to route HTTP/HTTPS traffic from outside the cluster to Services C) Encrypting traffic between nodes D) Controlling storage access

Answer: B

Explanation: Ingress defines rules for routing external HTTP/HTTPS requests to in-cluster Services. It supports host-based (app.example.com), path-based (/api, /web) routing, and TLS termination. The actual implementation is carried out by an Ingress Controller (Nginx, Traefik, Envoy, etc.).

Q39. What is the role of CNCF (Cloud Native Computing Foundation)?

A) An organization that directly operates cloud infrastructure B) A Linux Foundation non-profit that stewards open-source cloud native projects and advances the ecosystem C) The company that created Kubernetes D) A consortium of AWS, GCP, and Azure

Answer: B

Explanation: CNCF is a Linux Foundation non-profit that neutrally manages cloud native open-source projects like Kubernetes, Prometheus, Envoy, Containerd, ArgoCD, etc. Projects progress through Sandbox → Incubating → Graduated maturity levels.

Q40. What is the purpose of a ServiceAccount in Kubernetes?

A) An account for humans to log into the cluster B) An authentication identity used by Pods to call the Kubernetes API C) An account for inter-node authentication D) An account for Ingress access control

Answer: B

Explanation: A ServiceAccount is the identity used by Pods (applications) when accessing the Kubernetes API. A token is automatically issued upon creation, and RBAC is used to grant only necessary permissions. For human access, User or Group accounts are used.

Q41. Which statement about container image layers is correct?

A) Each RUN instruction creates a new layer; layers are immutable and reused B) A container image consists of a single layer C) Layers change dynamically at runtime D) Image layers are only cached on Kubernetes Nodes

Answer: A

Explanation: Docker/OCI images are a stack of immutable layers. Each Dockerfile instruction (FROM, RUN, COPY, etc.) creates a new layer. Identical layers are shared (reused) across multiple images to save storage. A read-write layer is added on top when a container runs.

Q42. What does "Immutable Infrastructure" mean in a cloud native context?

A) A policy of never deleting servers B) Never modifying deployed infrastructure; replacing with new instances when changes are needed C) Locking data so it cannot be changed D) Keeping infrastructure code read-only

Answer: B

Explanation: Immutable Infrastructure means deployed servers or containers are never modified in-place. When changes are needed, a new image is built and the instance is replaced. This prevents "configuration drift" and ensures consistency. The Kubernetes container model follows this principle.

Q43. What is a key characteristic of KEDA (Kubernetes Event-Driven Autoscaler)?

A) It only scales based on CPU/memory B) It auto-scales Pods from zero based on external event sources like message queue depth or event count C) It automatically adjusts cluster node counts D) It performs the same function as VPA

Answer: B

Explanation: KEDA is a CNCF graduated project that auto-scales Pods from 0 to N based on event-driven metrics from 60+ scalers including Kafka topic lag, RabbitMQ queue depth, Azure Service Bus, and AWS SQS. It extends the standard HPA.

Q44. What is the default behavior in Kubernetes when no NetworkPolicy is applied?

A) All Pod-to-Pod traffic is blocked by default B) All Pod-to-Pod traffic is allowed when no NetworkPolicy exists C) NetworkPolicy only controls communication between Control Plane components D) NetworkPolicy only controls external internet traffic

Answer: B

Explanation: Kubernetes follows an "open by default" policy — all Pod-to-Pod traffic is allowed when no NetworkPolicy objects exist. Applying a NetworkPolicy to a Pod whitelists allowed Ingress/Egress traffic. NetworkPolicy enforcement is handled by CNI plugins (Calico, Cilium, etc.).

Q45. How is data stored in a Secret object by default?

A) Encrypted with AES-256 B) Base64-encoded and stored in etcd (not encrypted) C) Stored as a SHA-256 hash D) Stored as plain text

Answer: B

Explanation: Data in Kubernetes Secrets is stored as base64-encoded values in etcd. Base64 is encoding, not encryption. For security, it is recommended to enable etcd Encryption at Rest or use external secret management tools like HashiCorp Vault or External Secrets Operator.

Q46. Which statement about Kubernetes etcd is correct?

A) etcd runs on Worker Nodes B) etcd is a distributed key-value store using the Raft consensus algorithm; an odd number of instances (3, 5, 7) is recommended C) etcd stores container images D) etcd data is stored only in memory and resets on restart

Answer: B

Explanation: etcd is the Control Plane's distributed key-value store that persistently stores all Kubernetes cluster state. It uses the Raft consensus algorithm to guarantee data consistency. 3, 5, or 7 (odd number) instances are recommended for high availability. Loss of etcd data means loss of the entire cluster, so regular backups are essential.

Q47. Which is NOT a valid Pod restartPolicy option?

A) Always B) OnFailure C) Never D) OnSuccess

Answer: D

Explanation: Pod restartPolicy options are Always (default, always restart), OnFailure (restart only on failure), and Never (never restart). OnSuccess does not exist. Jobs use OnFailure or Never, while Deployments enforce Always.

Q48. What is the role of CoreDNS in a Kubernetes cluster?

A) Caching container images B) Acting as the DNS server for service discovery within the cluster C) Encrypting traffic between nodes D) Load balancing Ingress traffic

Answer: B

Explanation: CoreDNS is Kubernetes' default DNS server. It enables service discovery by allowing DNS queries by Service name, e.g., my-service.my-namespace.svc.cluster.local.

Q49. Which of the following is NOT a Kubernetes Control Plane component?

A) kube-apiserver B) kube-scheduler C) kubelet D) kube-controller-manager

Answer: C

Explanation: kubelet is a Worker Node component. Control Plane components include kube-apiserver, etcd, kube-scheduler, and kube-controller-manager (plus cloud-controller-manager in some environments). kubelet runs on all nodes but is fundamentally a Worker Node component.

Q50. Which method is NOT a valid way to inject a ConfigMap into a Pod?

A) As environment variables (envFrom) B) Mounted as a volume C) Built directly into the Pod image D) As individual environment variables (env.valueFrom)

Answer: C

Explanation: Valid ways to inject a ConfigMap include environment variables (envFrom.configMapRef for all keys, env.valueFrom.configMapKeyRef for individual keys) and volume mounts (as files). Building configuration directly into the image violates the Immutable Infrastructure principle and contradicts the purpose of ConfigMaps (separating runtime config).

Q51. When would you use a Service of type ExternalName?

A) To expose an external IP as an in-cluster Service B) To abstract an external DNS name as an in-cluster Service name (CNAME alias) C) To open a port on all nodes externally D) To provision a cloud provider load balancer

Answer: B

Explanation: An ExternalName Service creates a CNAME record pointing to an external DNS name (e.g., my-external-db.example.com). Internal services can access the external service using an abstracted cluster name, so if the external endpoint changes, only the Service needs updating.

Q52. What is a characteristic of init containers?

A) They start simultaneously with application containers B) They run sequentially before main containers start; main containers only start after init containers complete C) They run continuously in the background D) They are only used for node initialization

Answer: B

Explanation: Init containers are special containers that run before the main app containers. If multiple init containers are defined, they run sequentially; each must complete successfully (exit 0) before the next starts. They are used for database readiness checks, config file generation, and dependency downloads.

Q53. What is the role of values.yaml in a Helm Chart?

A) Defines the chart's version and dependency information B) Defines default configuration values for the chart; can be overridden at deploy time C) Contains Kubernetes resource templates to deploy D) Documents how to use the chart

Answer: B

Explanation: In a Helm Chart, values.yaml defines the default values. These can be overridden with --set key=value or -f custom-values.yaml during helm install or helm upgrade. Chart.yaml contains chart metadata; the templates/ directory contains Kubernetes resource templates.

Q54. Which of the following is NOT a CNCF Graduated project?

A) Kubernetes B) Prometheus C) Terraform D) Argo

Answer: C

Explanation: Terraform is HashiCorp's infrastructure provisioning tool and is not a CNCF project (it uses the BSL license). CNCF Graduated projects include Kubernetes, Prometheus, Envoy, CoreDNS, containerd, Argo, Flux, Jaeger, and Vitess.

Q55. What does runAsNonRoot: true in a Pod Security Context mean?

A) Run the Pod in privileged mode B) Prohibit the container from running as root user (UID 0) C) Set the container's filesystem to read-only D) Restrict the container's network access

Answer: B

Explanation: runAsNonRoot: true rejects container startup if it would run as root (UID 0). The image must have a non-root user configured. This is an important security setting to prevent privilege escalation in container escape attacks. It is commonly combined with runAsUser: 1000.

Q56. What happens to a Pod when its Readiness Probe fails?

A) The container is restarted B) The Pod is deleted C) The Pod is removed from Service endpoints and stops receiving traffic D) The node is cordoned

Answer: C

Explanation: A Readiness Probe checks whether a container is ready to receive traffic. If it fails, the Pod is removed from the Service's Endpoints object and no longer receives traffic. No restart occurs. This is useful during long application startup times or temporary overload conditions.

Q57. Which statement about Kubernetes Namespaces is INCORRECT?

A) kube-system Namespace runs Kubernetes system components B) Namespaces isolate cluster-scoped resources like Nodes and PersistentVolumes C) ResourceQuota can be used to limit resource usage per Namespace D) The default Namespace is where resources are created when no Namespace is specified

Answer: B

Explanation: Namespaces isolate namespace-scoped resources like Pods, Deployments, and Services. Cluster-scoped resources like Nodes, PersistentVolumes, StorageClasses, and ClusterRoles do NOT belong to any Namespace. ResourceQuota and LimitRange can limit per-Namespace resource usage.

Q58. What command rolls back a Deployment to its previous version?

A) kubectl restart deployment my-app B) kubectl rollout undo deployment/my-app C) kubectl revert deployment my-app D) kubectl restore deployment my-app

Answer: B

Explanation: kubectl rollout undo deployment/my-app rolls back to the previous ReplicaSet. Use kubectl rollout history deployment/my-app to view history and --to-revision=2 to roll back to a specific version. Use kubectl rollout status to monitor rollout/rollback progress in real time.

Q59. What is the purpose of the Circuit Breaker pattern in cloud native architecture?

A) Protecting electrical circuits B) Blocking requests to failing services to prevent cascading failures C) Encrypting network traffic D) Managing database connection pools

Answer: B

Explanation: The Circuit Breaker pattern stops requests to a repeatedly failing microservice and returns immediate failures, preventing failure propagation to the entire system. Implemented in Istio, Envoy, and Resilience4j. It has three states: Closed (normal) → Open (blocking) → Half-Open (testing).

Q60. What are the prerequisites for HPA (Horizontal Pod Autoscaler) to work in Kubernetes?

A) Cluster Autoscaler must be installed B) Pods must have resource requests set and Metrics Server (or custom metrics server) must be running C) It can only be applied to StatefulSets D) At least 3 nodes are required

Answer: B

Explanation: For HPA to work with CPU metrics, two conditions are required: 1) Target Pods must have CPU requests set (current utilization = actual usage / requests). 2) Metrics Server must be deployed in the cluster to collect metrics. Custom metrics (KEDA) require a separate adapter.