본문 바로가기
[CKA] Service 유형 1) NodePort 문제문제Create and configure the service front-end-service so it's accessible through NodePort and routes to the existing pod named front-end. 풀이먼저 front-end이름의 Pod를 만들어야 한다.아래 처럼 명령어로 빠르게 만들 수 있고 공식 문서를 찾아 만들 수도 있다.https://kubernetes.io/docs/concepts/workloads/pods/#using-pods# podapiVersion: v1kind: Podmetadata: name: front-end labels: name: front-endspec: containers: - image: n.. 2025. 2. 9.
[CKA] Pod 유형 1) DaemonSet 문제 문제)Ensure a single instance of pod nginx is running on each node of the Kubernetes cluster where nginx also represents the Image name which has to be used.Do not override any taints currently in place. Use DaemonSet to complete this task and use ds-kusc00201 as DaemonSet name. 답)# 명령어cat apiVersion: apps/v1kind: DaemonSetmetadata: name: ds-kusc00201spec: selector: matchLabe.. 2025. 2. 7.
[CKA] Apiserver Crash Apiserver Crash문제. K8s API-Server 장애를 복구한다.답.로그 확인하는 것# journalctl 로 보기journalctl -r (역순)f (front)b (before)로 커서 이동 # cri 상태 확인crictl pscontrolplane $ crictl psCONTAINER IMAGE CREATED STATE NAME ATTEMPT POD ID POD9cffaa1a8bd39 03c7f74a90d48 31 minutes ago Running local-pat.. 2025. 2. 3.
[KIND] KIND란? KIND란?https://kind.sigs.k8s.io/ kindkind is a tool for running local Kubernetes clusters using Docker container “nodes”. kind was primarily designed for testing Kubernetes itself, but may be used for local development or CI. If you have go 1.16+ and docker, podman or nerdctl installed gokind.sigs.k8s.io KIND (Kubernetes IN Docker)는 Docker 컨테이너를 사용하여 로컬 Kubernetes 클러스터를 실행하기 위한 도구입니다. 주로 Kubernet.. 2025. 1. 24.
[KIND] KIND 활용 예제 MSA 샘플 1. 은행 계좌 조회구성 : 은행 시스템에 자신의 계좌에 잔고 조회를 할 수 있는 시스템 - Flask 로 웹 애플리케이션 구성, etcd 로 데이터베이스 구성https://github.com/tigera/ccol1/blob/main/yaobank.yaml # 생성curl -s -O https://raw.githubusercontent.com/tigera/ccol1/main/yaobank.yamlsed -i 's/nodeSelector/#nodeSelector/g' yaobank.yaml && sed -i 's/kubernetes.io/#kubernetes.io/g' yaobank.yamlsed -i 's/istio-injection: disabled/istio-injection: enabled/g' .. 2025. 1. 24.
[service] Kubernetes 에 실행중인 Pod 에서 외부 mysql 연결하기 쿠버네티스를 도입한다 하더라도 대부분 애플리케이션만 쿠버네티스 상에서 돌리고, 일반적으로 데이터베이스는 외부 Baremetal 로 실행 중인 경우가 많습니다.이 경우 굳이 데이터베이스를 쿠버네티스로 옮기지 않아도 쿠버네티스의 애플리케이션이 데이터베이스에 접근할 수 있는 방법이 있습니다.해결책은 Service 와 Endpoint 를 활용하는 방법입니다. 일반적으로 Service 를 만들 때 Selector 를 활용하여 다른 Pod 와 연결합니다. 이 때 Selector 가 잘 연결되면 Endpoint 도 자동으로 생성됩니다.하지만 위의 경우에는 데이터베이스(예: mariadb) 이 쿠버네티스 클러스터 외부에 있으므로 Selector 를 활용할 수 없습니다.이 경우에는 Endpoint 가 자동으로 생성되지 .. 2024. 3. 13.