본문 바로가기

전체 글

(220)
[Kubernetes]How to use Label and Selector - Concept Concept key-value 쌍으로 구성하며 사용자가 클러스터 안에 오브젝트를 만들 때 메타데이터로 설정할 수 있다. label의 key: 컨트롤러들이 pod를 관리할 때 자신이 관리해야 할 pod를 구분하는 역할. kubernetes는 label만으로 관리 대상을 구분하므로 특정 컨트롤러가 만든 pod라도 레이블을 변경하면 인식할 수 없다. 컨트롤러와 pod를 느슨하게 결합하는 이런 특징 때문에 쿠버네티스가 파드들을 관리할 때 유연성이 있다. label의 key, value 설정 규칙 63글자를 넘지 않아야 한다 시작과 끝 문자는 알파벳 대소문자 및 소문자([a-z0-9A-z]) 여야 한다. 중간에는 대시(-), 밑줄(_), 점(.), 숫자 등이 올 수 있다. label의 selector 설정 방법..
[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]Prometheus alert firing(etcd,kubelet,kube-proxy) in kubeadm Kubernetes problem kubeadm에 Prometheus를 설치하면 아래와 같은 Alert이 비정상적으로 발생한다. 각 컴포넌트를 수정하여 비정상적인 Alert을 삭제한다. "TargetDown for kube-proxy" "TargetDown for kubelet" "TargetDown for etcd" "KubeSchedulerDown" "KubeControllerManagerDown" "etcdInsufficientMembers" "etcdMembersDown Cause cannot connect node-exporter to these pods(kube-proxy,kubelet,etcd,kube-scheduler,kube-controller-manager) that running with node IP ..
[Prometheus](GCP)Install Stackdriver-exporter for monitoring GCP with helm chart Stackdriver? GCP(Google Cloud Platform) Product를(GCE, GKE, CLOUD SQL 등) 모니터링할 수 있는 Prometheus exporter. You must have appropriate IAM permissions for this exporter to work. If you are passing in an IAM key then you must have: monitoring.metricDescriptors.list monitoring.timeSeries.list stackdriver-exporter helm chart https://artifacthub.io/packages/helm/prometheus-community/prometheus-stackdrive..
[Prometheus]Install prometheus for kubernetes monitoring with helm chart Concept Prometheus is an open-source systems monitoring and alerting toolkit originally and Most services have an Exporter Prometheus Exporter List 참고 link Prometheus architecture Overview | Prometheus Prometheus server 시계열 데이터를 수집해서 저장 Client libarary 어플리케이션을 개발할 때 프로메테우스에서 데이터를 수집하도록 만드는 라이브러리 Push gateway 클라이언트에서 직접 프로메테우스로 데이터를 보낼 때 받는 역할 Exporter 프로메테우스 클라이언트 라이브러리를 내장해 만들지 않은 어플리케이션에서 데이터를..
[Kubernetes]Readiness probe failed: Waiting for elasticsearch cluster to become ready Problem Helm chart를 이용하여 Elasticsearch 설치 시 아래와 같은 에러 발생 Readiness probe failed: Waiting for elasticsearch cluster to become ready Solution Helm Chart의 아래 값 변경하고 다시 Install 한다. replicas: 1 minimumMasterNodes: 1 #2 clusterHealthCheckParams: 'wait_for_status=yellow&timeout=1s' #green helm install elasticsearch . -n efk