출처: Udemy, Kubernetes Certified (KCNA) + Hands On Labs + Practice Exams
Q2. Which Kubernetes autoscaling solution has the capability to scale workloads down to zero pods?
A. Kubernetes Event-Driven Autoscaling (KEDA)
+) KEDA는 이벤트 기반으로 워크로드를 감지하고 필요 시 0까지 스케일 다운 가능함. 다른 오토스케일러는 최소 레플리카 수 제한이 있음
Q3.Which of the following is a valid example of semantic versioning?
A. 1.2.3
Q4. What are the four pillars of Cloud Native Architecture?
A. Microservices, Containers, DevOps, CI/CD
Q11.During the phase when container images are being downloaded for a Pod in Kubernetes, what state is the Pod typically in?
A. Pending
+) 이미지 다운로드나 스케줄링 대기 시 Pod는 Pending 상태
Q19. What is the primary purpose of an Init Container in Kubernetes?
A. To execute pre-start tasks or setup actions before the main application container starts
Q20. What are the default namespaces in a Kubernetes installation?
A. default, kube-system, kube-public, kube-node-lease
+) '큐브 컨트롤러'와 '큐브 스케줄러'는 Kubernetes에서 유효한 기본 네임스페이스가 아님
Q21. In Prometheus, which metric type represents a value that can arbitrarily go up or down, like temperature or memory usage?
A.Gauge
+) Gauge는 값이 상승하거나 감소할 수 있음. (ex. 온도, 메모리 사용량)
counter는 오직 증가만 함 (또는 리셋)
histogram은 버켓 단위로 나눠서 수집
summary느 히스토그램과 유사하지만 분위수를 계산함
Q23.Which component in Kubernetes automatically adjusts the number of nodes in a cluster based on the demands of the workloads?
A. Cluster Autoscaler
+) Node 수 조절은 Cluster Autoscaler의 역할임.
Q27.Which of the following is a component of the Kubernetes Control Plane?
A. Cloud-controller-manager
+) 클라우드 컨트롤러 관리자는 경로, 로드 밸런서, 영구 디스크와 같은 클라우드 리소스의 라이프사이클을 관리, 마스터 노드에서 실행되며 기본 클라우드 인프라와 상호 작용하여 이러한 리소스를 관리
Q29. Which of the following represents the correct hierarchical workflow of components in a Kubernetes environment?
A. Clusters, Nodes, Pods, Containers
Q30.What are the primary modes of service discovery within a Kubernetes cluster?
A. Environment Variables and DNS
Q34.As a Site Reliability Engineer (SRE), which task would typically fall under your purview, especially in the context of ensuring system reliability?
A. Implementing and fine-tuning thresholds and alerts for monitoring system health
+)SRE는 시스템 안정성 확보가 핵심 역할
Q35. In a managed public cloud Kubernetes service, which component is most closely associated with issues like a LoadBalancer being stuck in a pending state?
A. Cloud Controller Manager
Q36.In a Kubernetes node, which component is primarily responsible for ensuring that the containers are running as defined in the Pod specifications?
A. Kubelet
+) Container Runtime: 컨테이너 이미지를 실제로 실행하고 lifecycle 관리 -> 하지만 PodSpec 해석이나 보장 역할은 없음.
Q40.In Kubernetes, what is an Endpoint primarily used to represent?
A. The IP addresses and ports of the Pods backing a Service
Q49. Which Kubernetes resource should you use if you need to ensure that an instance of a pod runs on every node in the cluster?
A. DaemonSet
Q52. Which kubectl command is used to list all the API resources, such as Pods, Services, and Deployments, available in a Kubernetes cluster?
A. kubectl api-resources
+) kubectl api-resources: 클러스터에서 사용 가능한 모든 API 리소스 종류 나열
kubectl get all: 현재 네임스페이스에서 실행 중인 주요 리소스(Pod, Service 등)의 객체 목록 조회
Q58. The cloud-native architecture centered around microservices proves to be a strong system that ensures what key quality in software systems?
A. Resiliency
ㄴ탄력성
Q59. What is the term for the process of automatically increasing or decreasing the number of instances based on demand?
A. Horizontal scaling
Q61. What are common components found in a service mesh implementation?
A. Data plane and Control plane
+) Data plane은 트래픽 처리, Control plane은 설정 및 정책 관리
Q63. In Kubernetes, what modification is made to a ClusterIP service to create a headless service?
A. Setting the ClusterIP to 'None'
+) ClusterIP 없음으로 DNS 레코드를 Pod에 직접 매핑함.
Q64. In a Pod, which Linux namespace do containers usually share?
A. Network namespace
Q65. Which Linux feature is utilised by Kubernetes for container isolation, limits the resource usage of a process or a set of processes?
A. cgroups
+) cgroups (control groups): Kubernetes에서 각 컨테이너에 대해 CPU, 메모리, 디스크 IO, 네트워크 등 사용량을 제한할 때 사용됨
iptables: Kubernetes는 iptables를 사용해 서비스 간 트래픽 라우팅, 클러스터 내부 네트워크 정책 적용 등에 활용함
SELinux (Security-Enhanced Linux): 리눅스 커널의 보안 모듈로, 강제적 접근 제어(MAC) 정책을 제공, 컨테이너가 호스트의 특정 파일이나 디렉터리에 접근하지 못하도록 제한
Q66. What does the nodeSelector field in a PodSpec use to place Pods on specific nodes in a Kubernetes cluster?
A. Labels assigned to nodes
Q71.In Kubernetes, what event triggers the kube-scheduler to assign a Pod to a specific node?
A. When a new Pod is created and needs to be scheduled
+) 스케줄러는 Pending 상태의 새 Pod에 대해 작동함.
Q74.In Kubernetes, which feature is crucial for managing distributed stateful applications to avoid conflicts like "split-brain" scenarios?
A. StatefulSets
+) Split-brain 상황이란?
분산 시스템에서 네트워크가 분리되어 클러스터의 일부 노드가 서로 다른 판단을 하는 상황
예: 두 노드가 서로를 죽은 줄 알고 둘 다 "마스터 역할"을 수행 → 데이터 불일치, 충돌
StatefulSet은 Pod ID 고정, 네트워크 고정, 볼륨 고정을 통해 재시작 시에도 동일한 볼륨과 DNS 이름을 유지 → 혼란 없음
분산 DB (예: Cassandra, Etcd, Zookeeper 등)는 노드 식별자가 일관성 있어야 안전하게 운영됨 그래서 다중 마스터로 인한 split-brain을 방지하기 위해 StatefulSet이 적합함
Q75. In the Open Container Initiative (OCI) Specification, which areas are standardised?
A. Container image format, runtime environment, and distribution
+) 컨테이너 이미지, 실행 환경, 배포 방식에 대한 오픈 표준 -> Docker, Podman, containerd, cri-o 등
Q. Which Kubernetes resource is most useful for running tasks on a predefined schedule?
A. CronJob
Q. In a Kubernetes node, which component is directly responsible for running containers?
A. Container Runtime
+)
Q. In Kubernetes, when would you use co-located containers within a single Pod, specifically in a sidecar pattern?
A. When the sidecar container provides auxiliary support, like logging or monitoring, to the main application container
+) Pod 내부의 모든 컨테이너는 동일한 IP 주소와 포트 네임스페이스를 공유 -> 사이드카 패턴과 상관 없음
Q. How does the Container Network Interface (CNI) in Kubernetes relate to Network Policies?
A. The CNI is responsible for implementing the rules defined in Network Policies
+) Kubernetes에서 NetworkPolicy는 "어떤 트래픽이 허용될지" 를 정의하는 정책(Policy) 하지만 이 정책을 실제로 적용하는 기능은 Kubernetes 자체가 아닌 CNI 플러그인에 의해 수행됨 -> CNI는 NetworkPolicy의 규칙을 구현(Enforce)하는 역할
CNI는 기본적인 네트워크 연결(connectivity) 을 제공하는 역할, NetworkPolicy는 트래픽 제어 정책을 정의하고, 이를 CNI가 적용하는 구조이기 때문에, 서로를 대체하지 않음
NetworkPolicy는 네트워크 트래픽 제어에 관한 정책을 선언하는 Kubernetes 리소스일 뿐, CNI 플러그인을 직접 "구성(configure)"하는 도구는 아님
CNI 플러그인은 NetworkPolicy의 존재 여부와 내용을 읽어 해석하고 적용하는 역할을 하지만, NetworkPolicy가 CNI 자체 설정(예: 네트워크 드라이버 설정 등)을 구성하는 건 아님
| 영어단어 | 뜻 |
|---|---|
| arbitrarily | 임의로 |
| auxiliary | 보조자 |
| purview | 책임 범위, 업무 범위 |