본문 바로가기

Cloud-native

(75)
[Kubernetes]What is kube-proxy (userspace, iptables, IPVS) Concept 쿠버네티스에서 서비스를 만들었을 때 클러스터 IP나 노드 포트로 접근할 수 있게 만들어 실제 조작을 하는 컴포넌트 쿠버네티스 클러스터의 노드마다 실행되면서 클러스터 내부 IP로 연결하려는 요청을 적절한 파드로 전달한다. kube-proxy의 네트워크 관리 방법 userspace, iptables, IPVS 초기 → userspace 현재 → iptables 앞으로의 예상 → IPVS userspace 클라이언트 요청 → 서비스의 클러스터 IP → iptables → kube-proxy 그리고 서비스의 클러스터 IP는 연결되어야 하는 적절한 파드(애플리케이션)로 연결해준다. 이때, 요청은 RR 방식으로 분배. 파드 하나로의 연결 요청이 실패하면 자동으로 다른 파드에 연결을 재시도. iptab..
[Kubernetes]What is Pause Container(Infra Container) Concept 쿠버네티스에는 모든 파드에서 항상 실행되는 pause라는 컨테이너가 있다. 이 pause를 파드 인프라 컨테이너라고 한다. 프로세스 식별자가 1(PID 1)로 설정되므로 다른 컨테이너의 부모 컨테이너 역할을 한다. 파드 안 다른 컨테이너는 pause 컨테이너가 제공하는 네트워크를 공유해서 사용한다. 따라서, 파드 안 다른 컨테이너가 재시작했을 때는 파드의 IP를 유지하지만, pause 컨테이너가 재시작되면 파드 안 모든 컨테이너도 재시작한다. 2022.05.01 - [리뷰/도서] - [도서]쿠버네티스 입문
[Kubernetes]What are Label and Annotation in Kubernetes Concept Kubernetes 자원들의 메타데이터를 관리하는 데 사용 Label selector와 함께 특정 label이 있는 자원들을 선택할 때 주로 사용. 클러스터 안에서 사용자가 오브젝트를 생성할 때 해당 오브젝트를 구분하는 용도. 사용자가 임의로 원하는 값을 지정해서 사용 Annotation 주석 성격의 메타데이터를 기록하는 데 사용 사용자가 원하는 값을 설정하기보다 쿠버네티스 시스템에서 필요한 정보들을 표시하는 데 사용.
[Kubernetes]Install EFK for Kubernetes logging with helm chart in Kubernetes Purpose Install kubernetes logging system with EFK(Elasticsearch + Fluentd + Kibana) 1. Install elasticsearch helm chart How to use helm chart 2022.05.24 - [Container/Kubernetes] - [Kubernetes]Understand how to use helm chart in Kubernetes helm repo add elastic https://helm.elastic.co helm fetch elastic/elasticsearch Create pv first for elasticsearch apiVersion: v1 kind: PersistentVolume metadat..
[Kubernetes]Nginx-Ingress custom errors page 인그레스로 연결된 서비스에 없는 페이지를 호출할 경우(default page) 아래에 작성한 커스텀 에러 페이지를 표출한다 git clone 아래 git에서 소스를 다운 받는다 git clone https://github.com/kenmoini/custom-nginx-ingress-errors.git error page 작성 /www 하위 경로에 error page를 작성 /root/workspace/custom-nginx-ingress-errors/www Docker image build 작성한 error page와 함께 새로운 docker image를 생성한다 docker build -t harbor.ta.net/ta/error-pages:v1.0 . Docker image push custom im..
[Kubernetes]Pull an Image from a Private Registry with Secret in Kubernetes Purpose use private registry with docker-registry secret Create registry secret with command kubectl -n [namespace] create secret docker-registry [secret-name] --docker-server= --docker-username='[your-name]' --docker-password='[your-pword]' --docker-email='[your-email]' [your-registry-server] 은 프라이빗 도커 저장소의 FQDN 주소이다. 도커허브(DockerHub)는 https://index.docker.io/v2/ 를 사용한다. [your-name] 은 도커 사용자의 계정..
[Kubernetes]Understand how to use helm chart in Kubernetes Purpose To understand How to use helm chart in Kubernetes Helm chart directory structure wordpress/ Chart.yaml # A YAML file containing information about the chart LICENSE # OPTIONAL: A plain text file containing the license for the chart README.md # OPTIONAL: A human-readable README file values.yaml # The default configuration values for this chart values.schema.json # OPTIONAL: A JSON Schema f..
[Kubernetes]Install helm in CentOS Purpose Install helm that set resources about kubernetes Install helm [~/workspace/helm]curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 [~/workspace/helm]chmod 700 get_helm.sh [~/workspace/helm]./get_helm.sh Downloading https://get.helm.sh/helm-v3.4.2-linux-amd64.tar.gz Verifying checksum... Done. Preparing to install helm into /usr/local/bin helm ..