HostAliases Pod /etc/hosts 파일 내용을 수정할 수 있다. 내부적으로 Public DNS에 정의되지 않은 도메인 이름을 사용하거나, TEST할 때 유용하게 쓰일 수 있다. 쿠버네티스에서는 init 컨테이너나 다른 수단을 사용하여 /etc/hosts 파일을 직접 편집하지 않고 hostAliases 필드를 사용하여 DNS 구성을 수정하는 것을 권장한다.1. TEST 시나리오1. nginx pod를 기동하여 기본 /etc/hosts 파일 내용을 확인한다.2. nginx pod yaml에서 hostAliases 설정을 추가하여 Pod를 재 기동한다.3. / etc/hosts 파일 내용이 수정 되었는지 확인한다. 2. TEST 및 설정1. nginx pod 기동 아래 파일은 nginx.ya..
Kubernetes
1. 개 요Metrics Server는 Kubelet에서 리소스 메트릭을 수집하여 Metrics API를 통해 Kubernetes apiserver에 노출하여 HPA(Horizontal Pod Autoscaler)와 VPA(Vertical Pod Autoscaler)에서 사용할 수 있게 한다.Metrics Server를 통해 Kuberntes Cluster Node에 CPU, Memory 모니터링이 가능하다.2. 설 치2.1. 단일 설치Metrics Server설치는 yaml파일을 통해 할 수 있다.components.yaml을 통해 설치 할 시 1개의 metrics server가 설치 된다.$ kubectl apply -f https://github.com/kubernetes-sigs/metrics..

개 요Ubuntu 환경에서 Kubernetes 설치 방법을 설명2023년 11월 13일 부로 apt.kubernetes.io Repository는 deprcated 되었고, pkgs.k8s.io로 변경되었다.1. 설치 환경구 분버 전비 고OSUbuntu 22.04 Kubernetesv1.26 cri-ov1.24.6Runtime2. OS 환경구 분Master NodeWorker NodeCPU2core1coreMemory2GB1GB설치 요구 사항1. 방화벽 설정# 6443-10250/tcp port를 OPEN하거나 방화벽을 종료$ firewall-cmd --add-port=6443-10250/tcp$ systemctl stop firewlld.service2. Selinux off 설정$ seten..

CASE 1 Ubuntu OS 환경에서 Kubernetes 설치 시 다운 받은 Google 클라우드 퍼블릭 키이 정상 동작하지 않음. apt-get install -y kubelet kubectl kubeadm 시, 아래와 같은 에러가 발생 Get:2 http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/1.24:/1.24.6/xUbuntu_20.04 InRelease [1656 B] Hit:3 http://kr.archive.ubuntu.com/ubuntu jammy InRelease Get:4 http://kr.archive.ubuntu.com/ubuntu jammy-updates InRelease [..