Walkthrough overview
[Telegraf] ---8086--> [InfluxDB] <---8086--- [CH Srv] <---443--- [External] /\ 8086| |9094 \/ [Kapacitor]
이번 장에서는 보다 더 다양한 production 환경에 근접한 실습이 될 수 있도록 위 서비스를 배포하여 본다.
또한, K8s application package 관리의 편의성을 위해 Helm Chart를 사용하기로 한다.
기본적인 사용법은 Quickstart Helm 을 참고하고, 아래 컴포넌트들을 하나씩 배포하여 보자.
InfluxDB
CloudHub와 호환되는 InfluxDB의 버전은 1.18이므로, InfluxDB:1.18로 배포하기 위해 아래 influxdata의 repo를 추가한다.
Add Helm Repo
만일 아래 influxdata의 repo가 추가되어 있지 않다면, 아래 명령어로 추가하여 준다.
$ helm repo add influxdata https://helm.influxdata.com/ $ helm search repo influxdb NAME CHART VERSION APP VERSION DESCRIPTION bitnami/influxdb 5.7.0 2.7.1 InfluxDB(TM) is an open source time-series data... influxdata/influxdb 4.12.3 1.8.10 Scalable datastore for metrics, events, and rea... influxdata/influxdb-enterprise 0.1.22 1.10.0 Run InfluxDB Enterprise on Kubernetes influxdata/influxdb2 2.1.1 2.3.0 A Helm chart for InfluxDB v2 influxdata/kapacitor 1.4.6 1.6.4 InfluxDB's native data processing engine. It ca... influxdata/chronograf 1.2.5 1.9.4 Open-source web application written in Go and R... influxdata/telegraf 1.8.28 1.26.3 Telegraf is an agent written in Go for collecti... influxdata/telegraf-operator 1.3.11 v1.3.10 A Helm chart for Kubernetes to deploy telegraf-...
Installation
# 편의상 "helm-test" namespace 생성. $ kubectl create ns helm-test # helm-test ns에 chart name은 자동 생성 모드(-g)로 생성. $ helm install -n helm-test -g influxdata/influxdb --set persistence.enabled=false NAME: influxdb-1688227557 LAST DEPLOYED: Sun Jul 2 01:06:05 2023 NAMESPACE: helm-test STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: InfluxDB can be accessed via port 8086 on the following DNS name from within your cluster: http://influxdb-1688227557.helm-test:8086 You can connect to the remote instance with the influx CLI. To forward the API port to localhost:8086, run the following: kubectl port-forward --namespace helm-test $(kubectl get pods --namespace helm-test -l app=influxdb-1688227557 -o jsonpath='{ .items[0].metadata.name }') 8086:8086 You can also connect to the influx CLI from inside the container. To open a shell session in the InfluxDB pod, run the following: kubectl exec -i -t --namespace helm-test $(kubectl get pods --namespace helm-test -l app=influxdb-1688227557 -o jsonpath='{.items[0].metadata.name}') /bin/sh To view the logs for the InfluxDB pod, run the following: kubectl logs -f --namespace helm-test $(kubectl get pods --namespace helm-test -l app=influxdb-1688227557 -o jsonpath='{ .items[0].metadata.name }')
Add Comment