Kubernetes cluster의 Applications tab > Elastic Stack 설치
설치 전 환경 설정
PersistentVolumeClaim 생성
pvc.yaml 파일 생성 (storageClass는 prometheus 설치시 생성한 sc 사용)
$ vi pvc.yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: name: elastic-stack-elasticsearch-master-elastic-stack-elasticsearch-master-0 namespace: "gitlab-managed-apps" spec: storageClassName: "managed-nfs-storage" accessModes: - ReadWriteOnce resources: requests: storage: 10Gi --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: elastic-stack-elasticsearch-master-elastic-stack-elasticsearch-master-1 namespace: "gitlab-managed-apps" spec: storageClassName: "managed-nfs-storage" accessModes: - ReadWriteOnce resources: requests: storage: 10Gi --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: elastic-stack-elasticsearch-master-elastic-stack-elasticsearch-master-2 namespace: "gitlab-managed-apps" spec: storageClassName: "managed-nfs-storage" accessModes: - ReadWriteOnce resources: requests: storage: 10Gi
yaml 배포
$ kubectl create -f pvc.yaml
persistentVolume 및 persistentVolumeClaim 생성 확인
$ kubectl get pv,pvc -A NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE persistentvolume/pvc-67be328f-225f-4216-b883-25d94df31984 20Gi RWO Retain Bound gitlab-managed-apps/prometheus-alertmanager managed-nfs-storage 22h persistentvolume/pvc-958d7e87-520d-414c-8e49-3281ad4168ab 10Gi RWO Retain Bound gitlab-managed-apps/elastic-stack-elasticsearch-master-elastic-stack-elasticsearch-master-0 managed-nfs-storage 40m persistentvolume/pvc-a1f18625-9670-4f06-94fb-a849ccc6748d 10Gi RWO Retain Bound gitlab-managed-apps/elastic-stack-elasticsearch-master-elastic-stack-elasticsearch-master-1 managed-nfs-storage 40m persistentvolume/pvc-bb6006be-0f4a-44f5-b8ab-2c9754ccb40e 20Gi RWO Retain Bound gitlab-managed-apps/prometheus-prometheus-server managed-nfs-storage 22h persistentvolume/pvc-f47cc89f-5b41-469e-b4af-6744b79253d0 10Gi RWO Retain Bound gitlab-managed-apps/elastic-stack-elasticsearch-master-elastic-stack-elasticsearch-master-2 managed-nfs-storage 40m NAMESPACE NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE gitlab-managed-apps persistentvolumeclaim/elastic-stack-elasticsearch-master-elastic-stack-elasticsearch-master-0 Bound pvc-958d7e87-520d-414c-8e49-3281ad4168ab 10Gi RWO managed-nfs-storage 40m gitlab-managed-apps persistentvolumeclaim/elastic-stack-elasticsearch-master-elastic-stack-elasticsearch-master-1 Bound pvc-a1f18625-9670-4f06-94fb-a849ccc6748d 10Gi RWO managed-nfs-storage 40m gitlab-managed-apps persistentvolumeclaim/elastic-stack-elasticsearch-master-elastic-stack-elasticsearch-master-2 Bound pvc-f47cc89f-5b41-469e-b4af-6744b79253d0 10Gi RWO managed-nfs-storage 40m gitlab-managed-apps persistentvolumeclaim/prometheus-alertmanager Bound pvc-67be328f-225f-4216-b883-25d94df31984 20Gi RWO managed-nfs-storage 22h gitlab-managed-apps persistentvolumeclaim/prometheus-prometheus-server Bound pvc-bb6006be-0f4a-44f5-b8ab-2c9754ccb40e 20Gi RWO managed-nfs-storage 22h
Master node taint 수정
마스터 노드 taint 확인
$ kubectl describe node twoseed-laptop | grep Taints Taints: node-role.kubernetes.io=master:NoSchedule
taint 설정 해제
$ kubectl taint nodes twoseed-laptop node-role.kubernetes.io=master:NoSchedule- node/twoseed-laptop untainted
Prometheus 설치 확인
Kubernetes cluster의 Applications tab 확인
마스터 노드 터미널에서 Pod 확인
$ kubectl get pod -o wide -n gitlab-managed-apps NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES certmanager-cainjector-8546f8c47c-qzsnp 1/1 Running 7 2d2h 10.244.1.11 twoseed-server <none> <none> certmanager-cert-manager-7558d9f5c5-qsms9 1/1 Running 1 2d2h 10.244.1.13 twoseed-server <none> <none> certmanager-cert-manager-webhook-69596d6cb-pt8dv 1/1 Running 0 2d2h 10.244.1.12 twoseed-server <none> <none> elastic-stack-elasticsearch-master-0 1/1 Running 0 11m 10.244.1.94 twoseed-server <none> <none> elastic-stack-elasticsearch-master-1 1/1 Running 0 11m 10.244.2.48 twoseed-centos <none> <none> elastic-stack-elasticsearch-master-2 1/1 Running 0 11m 10.244.0.15 twoseed-laptop <none> <none> elastic-stack-filebeat-4qnfz 1/1 Running 0 11m 10.244.2.49 twoseed-centos <none> <none> elastic-stack-filebeat-nzlmv 1/1 Running 0 11m 10.244.0.14 twoseed-laptop <none> <none> elastic-stack-filebeat-xqmrh 1/1 Running 0 11m 10.244.1.95 twoseed-server <none> <none> ingress-nginx-ingress-controller-75686bdf76-85kvx 2/2 Running 0 17m 10.244.1.92 twoseed-server <none> <none> ingress-nginx-ingress-default-backend-c9b59c85-p8swd 1/1 Running 0 17m 10.244.1.91 twoseed-server <none> <none> prometheus-alertmanager-58b88c665b-b7sqt 2/2 Running 0 22h 10.244.2.31 twoseed-centos <none> <none> prometheus-kube-state-metrics-f795f46c-zsph5 1/1 Running 0 22h 10.244.2.30 twoseed-centos <none> <none> prometheus-prometheus-server-84b688d6b4-qc7b4 2/2 Running 0 22h 10.244.1.40 twoseed-server <none> <none> runner-gitlab-runner-5b9967b65d-blwsk 1/1 Running 0 26h 10.244.2.23 twoseed-centos <none> <none>
Add Comment