Notification
새로운 알림이 없습니다.

[ ELK ] ELK Stack Configuration with Portainer(1)

ELK Stack Configuration


  • Agenda
    • What is Portainer?
      • Features
        • Advantages
        • DisAdvantages
      • Portainer Deploy with GKE
  • Reference
  • Next Actions


What is Portainer?

Portainer는 Docker 환경을 관리하는 오픈소스 플랫폼입니다. 웹 기반 UI를 제공하여 컨테이너, 이미지, 볼륨, 네트워크 등을 쉽게 관리할 수 있도록 도와줍니다. Portainer는 다음과 같은 기능을 제공합니다.

Features

다음은 간략하게 Portainer의 기능에 대해 설명 해보겠습니다. 

  • Features
    • Container 배포 및 관리
      • Conatiner를 쉽게 배포하고, 시작, 중지, 삭제, 재시작, 로그 확인 등을 관리 가능
    • Image 관리
      • Docker Hub에서 Image를 검색하고 다운로드할 수 있으며, 사용자 정의 Image를 Build하고 관리 가능
    • Volume 관리
      • Volume을 생성, 삭제, 편집하고, Container에 연동 가능
    • Network 관리
      • Network를 생성, 삭제, 편집하고, Container에 연동 가능
    • RBAC(Role-Based Access Control)
      • 사용자를 생성하고, 그룹에 할당하며, RBAC(Role-Based Access Control)을 통해 권한을 관리 가능
    • Stack Deploy 
      • Docker Compose를 사용하여 여러 Container로 구성된 Application을 쉽게 Deploy 가능
    • Template 관리
      • Container Deploy를 위한 Template을 만들고 관리할 수 있습니다.
    • Monitoring  
      • Container의 CPU, Memory, Network Usage 등을 실시간으로 Monitoring 가능
    • Notification
      • Container Status에 대한 알림을 설정할 수 있습니다.
  • Advantages
    • 웹 기반 UI를 제공하여 Docker 환경 쉽게 관리가능
    • Container Deploy, 관리, Monitoring 등 다양한 기능 제공
    • 다양한 Platform에서 실행 할수 있으며, Workload를 여러 Host에 분산 가능
    • 사용자 및 권한 관리 기능을 제공하여 Docker 환경을 안전하게 관리 가능
  • DisAdvantages
    • 대규모 환경에서는 성능 저하가 발생할수도 있음
    • 사용자 및 권한 관리 기능을 제대로 설정하지 않을 경우, 보안 취약점이 발생할 수 있음

Portainer Deploy with GKE

다음은 GKE를 활용하여 Portainer를 배포해보겠습니다. 
필자는 GCP의 GKE에 접근하여, Helm Chart를 통해 Portainer를 배포 하였습니다. 

  • Helm Chart Repository 추가
    helm repo add portainer https://portainer.github.io/k8s/ helm repo update "portainer" has been added to your repositories Hang tight while we grab the latest from your chart repositories... ...Successfully got an update from the "portainer" chart repository Update Complete. ⎈Happy Helming!⎈
  • Portainer Default values.yaml 파일 가져오기
    helm show values portainer/portainer > portainer-values.yaml

  • Default Values 수정
    replicaCount: 2 nodeSelector: cloud.google.com/gke-nodepool: GKE_NODEPOOL_NAME persistence: enabled: true size: "10Gi" annotations: {} storageClass: pd-balanced service: # Set the httpNodePort and edgeNodePort only if the type is NodePort # For Ingress, set the type to be ClusterIP and set ingress.enabled to true # For Cloud Providers, set the type to be LoadBalancer type: ClusterIP httpPort: 9000 # BackendConfig Portname 명시 필요 httpsPort: 9443 # httpNodePort: 30777 # NodePort 설정은 필요 없음 # httpsNodePort: 30779 # NodePort 설정은 필요 없음 # edgePort: 8000 # edgeNodePort: 30776 annotations: cloud.google.com/neg: '{"ingress": true}' cloud.google.com/backend-config: '{"ports": {"http":"BACKEND_CONFIG_NAME"}}'

  • Portainer Deploy with Helm
    helm install portainer portainer/portainer -f portainer-deployment/portainer-values.yaml

  • GKE Ingress Deploy
    kubectl apply -f portainer-deployment/portainer-ingress.yaml
  • Portainer UI

Summary

Portainer는 Docker 및 Kubernetes와 같은 컨테이너화된 애플리케이션의 관리와 모니터링을 위한 웹 기반의 오픈 소스 플랫폼입니다.
사용자는 직관적인 웹 UI를 통해 컨테이너, 이미지, 네트워크, 볼륨 등을 쉽게 관리할 수 있으며, 다양한 환경에서 일관된 인터페이스를 제공합니다.
Portainer는 설치와 사용이 간편하며, 개발자와 운영자가 복잡한 컨테이너 오케스트레이션을 단순화하는 데 도움을 줍니다.

Reference

Next Action

GKE에 ELK Stack을 구축하기 위해 Helm Chart를 통해 Portainer를 배포하였으니, Portainer를 통해 ELK Cluster를 Docker swarm을 통해 구축하는것을 공유드릴 예정입니다. 

끝으로 이 포스팅을 보시는 분들이 관련 정보를 얻으시는데 도움이 되었으면 합니다.
    ELK
    Stan Cloud
    Stan Cloud
    An avid cloud engineering Fan
    대화 참여하기
    댓글 쓰기