1. 스토리지 영구볼륨의 필요성 - 별도의 스토리지 설정을 하지 않으면 호스트 노드의 임시 디스크에 데이터가 보관됨 - 컨테이너를 삭제하면 임시디스크에 있는 데이터도 삭제 - 테스트용 Pod yaml 작성 apiVersion: v1kind: Podmetadata: creationTimestamp: null labels: run: pod name: podspec: containers: - image: busybox name: pod resources: {} command: - "/bin/sh" - "-c" - "while true; do date >> /home/pod-out.txt; cd /home sync; sync; sleep 30; done" dnsP..

1. Traefik 인그레스- 로드밸런서 타입 서비스는 L4까지만 지원하므로 인그레스라는 별도의 오브젝트로 L7까지 기능을 제공할 수 있다. - 외부에서 들어오는 HTTP요청에 대한 서비스 처리 규칙을 정의할 수있다.- SSl/TLS 인증서 또한 관리 가능 1) Traefik 컨트롤러 - 인그레스는 설정에 관련된 부분만 포함하고, 실제 네트워크 트레픽 처리는 인그레스 컨트롤러가 담당helm repo add traefik https://helm.traefik.io/traefikhelm repo listhelm pull traefik/traefiktar xvfz traefik-*rm -rf traefik-*cd traefik cp values.yaml my-values.yaml# 변수 수정----------..

1. MetalLB: 오픈소스형 로드밸런서1) 설치 [root@DESKTOP-ARLDN2P ~ (ubun01:nginx)]# helm repo add metallb https://metallb.github.io/metallb[root@DESKTOP-ARLDN2P ~ (ubun01:nginx)]# helm repo listNAME URLbitnami https://charts.bitnami.com/bitnamimetallb https://metallb.github.io/metallb[root@DESKTOP-ARLDN2P ~ (ubun01:nginx)]# helm pull metallb/metallb --version 0.13.7[root@DESKTOP-ARLDN2P ~ (ubun01:nginx)]# ..
1. helm1) 헬름 차트: 애플리케이션 설치에 사용되는 네트워크, 스토리지, 보안과 관련된 여러 쿠버네티스 리소스를 묶어놓은 패키지 - 디렉토리 구조로 구서오디어 있으며, 각 디렉토리, 파일들은 리소스를 정의한다. - 헬름 차트를 통해 개별 리소스 마다 하나씩 별도로 설치하지 않고 일괄 설치 2) 헬름리포지토리: 다양한 헬름 차트를 저장하고 공유하는 저장소3) helm 설치[root@DESKTOP-ARLDN2P ~ (ubun01:default)]# curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3[root@DESKTOP-ARLDN2P ~ (ubun01:default)]# chmod..

로컬에서 원격으로 클러스터를 관리할 수 있는 환경을 설정할 것입니다. 1. SSH로 클러스터 config 복사#로컬 터미널 환경에서 실행ssh 172.17.29.61sudo vi .kube/config# 그대로 복사apiVersion: v1clusters:- cluster: server: https://127.0.0.1:6443 name: cluster.localcontexts:- context: cluster: cluster.local user: kubernetes-admin name: kubernetes-admin@cluster.localcurrent-context: kubernetes-admin@cluster.localkind: Configpreferences: {}use..

1. kubespray를 활용한 간단한 클러스터 자동화 설치1) kubespray 설치- Vagrant 등을 활용해서 보다 쉽게 할 수 있지만, 실제 업무에서 활용되는 kubespray, ansible등을 활용하여 설치를 진행하겠습니다. sjw1995628/kubespray: Deploy a Production Ready Kubernetes Cluster GitHub - sjw1995628/kubespray: Deploy a Production Ready Kubernetes ClusterDeploy a Production Ready Kubernetes Cluster. Contribute to sjw1995628/kubespray development by creating an account on GitH..

알라딘: [전자책] 24단계 실습으로 정복하는 쿠버네티스 [전자책] 24단계 실습으로 정복하는 쿠버네티스실무 현장의 경험을 고스란히 담은 쿠버네티스 실습서. 총 24개의 장으로 구성돼 있고, 각 장마다 다양한 실습을 진행한다. 완전한 서비스를 제공하기 위해 필요한 모든 요소를 제공하며, 특히www.aladin.co.kr해당 서적을 바탕으로 프로젝트 진행 1. 가상환경 구성 1) Ubuntu 20.04 LTS 이미지 다운2) VirtualBox 설치- VirtualBox 구성시 서적에 요구된 IP를 기반으로 네트워크를 구성해야하기 때문에 vbbox adapter를 수정해야함 - 제어판 -> 네트워크 및 인터넷 -> 네트워크 연결 -> 이더넷 -> 속성 -> TCP/IPv4- 서버는 총 3개로 구성하며,..
문제 #1 You have access to multiple clusters from your main terminal through kubectl contexts. Write all those context names into /opt/course/1/contexts.Next write a command to display the current context into /opt/course/1/context_default_kubectl.sh, the command should use kubectl.Finally write a second command doing the same thing into /opt/course/1/context_default_no_kubectl.sh, but without the..
문제#1 PV및 PVC 생성 및 데이터 읽기/쓰기1) 문제시나리오- PV,PVC 구성하여 Pod가 데이터를 읽고 쓸 수 있도록 설정 (1) PV 생성 - 이름: manual-pv- 스토리지 크기:1Gi- 접근 모드: ReadWriteOnce- 호스트노드의 /mnt/data: 디렉토리를 사용하도록 설정(2) PersistentVolumeClaim - 이름: manual-pvc- 요청 스토리지 크기: 500Mi- 접근 모드: ReadWriteOnce(3) Pod 생성- 이름: test-pod- 볼륨: PVC를 마운트하여, /data경로에서 데이터를 읽고 쓸 수 있도록 설정 - Pod가 실행되면 /data/testfile.txt 파일을 생성하고, 파일에 "Hello from Kubernetes!" 라는 내용을..
1. 문제#1: CoreDNS를 통한 내부 DNS 확인1) 문제시나리오(1) 서비스 생성 - nginx 이미지를 사용하여 Deployment와 ClusterIP 서비스를 생성 - Deployment 이름: nginx-deployment, 서비스 이름: 'nginx-service'(2) DNS 테스트 - 테스트용 Pod를 생성 - 테스트용 Pod에서 nginx-service와 FQDN(nginx-service.default.svc.cluster.local)으로 요청을 보냄 - 요청이 성공적으로 전달되는지 확인 2) 해결과정 (1) Deployment및 Service YAML작성 - nginx-deployment.yamlapiVersion: apps/v1kind: Deploymentmetadata: nam..