/
[Kubernetes] Elastic Stack 설치
[Kubernetes] Elastic Stack 설치
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 설정 해제
Elastic stack 설치 확인
Kubernetes cluster의 Applications tab 확인
마스터 노드 터미널에서 Pod 확인