helm离线部署kapacitor
文章目录
1. 安装前准备
1.1 influxdb
influxdb已安装
1.2 chart包准备
下载地址: >>>kapacitor.tar.gz
1.3 镜像准备
-
准备镜像
kapacitor:latest -
上传私有仓库
harbocto.xxx.com.cn/public/kapacitor:latest
2. 修改配置文件
修改 values.yml 文件
2.1 修改镜像(离线必要)
image:
repository: "harbocto.xxx.com.cn/public/kapacitor"
#tag: "1.5.9-alpine"
tag: "latest"
pullPolicy: "IfNotPresent"
2.2 修改service类型(非必须)
非必要,根据需求而定
service:
#type: ClusterIP
type: NodePort
2.3 连接influxdb(必要)
influxURL: http://iot-influxdb.iot-mp:8086
2.4 资源限制(非必要)
在persistence:
中,根据需要修改
3. 安装
3.1 安装服务
[root@IoT-M01 kapacitor]# kubectl create namespace kapacitor
[root@IoT-M01 kapacitor]# helm upgrade kapacitor -n kapacitor ./
3.2 输出
安装完毕输出如下:
如果k8s稍了解,这些信息并没有什么实质作用。
NAME: chronograf
LAST DEPLOYED: Tue Aug 17 09:26:03 2021
NAMESPACE: kapacitor
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Chronograf can be accessed via port 80 on the following DNS name from within you r cluster:
http://chronograf-chronograf.kapacitor
You can easily connect to the remote instance from your browser. Forward the web server port to localhost:8888:
kubectl port-forward --namespace kapacitor $(kubectl get pods --namespace kapa citor -l app=chronograf-chronograf -o jsonpath='{ .items[0].metadata.name }') 88 88
You can also connect to the container running Chronograf. To open a shell sessio n in the pod run the following:
kubectl exec -i -t --namespace kapacitor $(kubectl get pods --namespace kapaci tor -l app=chronograf-chronograf -o jsonpath='{.items[0].metadata.name}') /bin/s h
To view the logs for the Chronograf pod run the following:
kubectl logs -f --namespace kapacitor $(kubectl get pods --namespace kapacitor -l app=chronograf-chronograf -o jsonpath='{ .items[0].metadata.name }')
3.3 查看对象
[root@IoT-M01 kapacitor]# kubectl get all -n kapacitor
NAME READY STATUS RESTARTS AGE
pod/kapacitor-kapacitor-c8d85b7b6-9qvpg 1/1 Running 0 82m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/kapacitor-kapacitor NodePort 10.1.242.75 <none> 9092:31002/TCP 82m
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/kapacitor-kapacitor 1/1 1 1 82m
NAME DESIRED CURRENT READY AGE
replicaset.apps/kapacitor-kapacitor-c8d85b7b6 1 1 1 82m