helm 离线部署chronograf

1. 准备

1.1 环境

1.2 chart 包

下载地址: >>>chronograf.tar.gz

1.3 镜像准备

  • 下载公网镜像
    chronograf:1.8.8
  • 上传私有仓库
    harbocto.xxx.com.cn/public/chronograf:1.8.8

2. 修改配置文件

修改values.yml文件

2.1 修改镜像(离线必须)

image:
  repository: "harbocto.boe.com.cn/public/chronograf"
  ## default: quay.io/influxdb/chronograf
  tag: 1.8.8
  pullPolicy: IfNotPresent

2.2 修改service类型(建议)

service:
  replicas: 1
  #type: ClusterIP
  type: NodePort

2.3 修改资源限制(非必要)

根据实际需要修改即可

3. 部署

3.1 部署服务

我们和之前的kapacitor部署在一个namespace空间。

[root@IoT-M01 chronograf]# helm upgrade chronograf -n kapacitor ./

部署完输出如下(没有什么很重要的信息):

Release "chronograf" has been upgraded. Happy Helming!
NAME: chronograf
LAST DEPLOYED: Tue Aug 17 10:05:10 2021
NAMESPACE: kapacitor
STATUS: deployed
REVISION: 5
TEST SUITE: None
NOTES:
Chronograf can be accessed via port 80 on the following DNS name from within your cluster:

  http://chronograf-chronograf.kapacitor

You can easily connect to the remote instance from your browser. Forward the webserver port to localhost:8888:

  kubectl port-forward --namespace kapacitor $(kubectl get pods --namespace kapacitor -l app=chronograf-chronograf -o jsonpath='{ .items[0].metadata.name }') 8888

You can also connect to the container running Chronograf. To open a shell session in the pod run the following:

  kubectl exec -i -t --namespace kapacitor $(kubectl get pods --namespace kapacitor -l app=chronograf-chronograf -o jsonpath='{.items[0].metadata.name}') /bin/sh

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.2 查看结果

因为和之前的kapacitor部署在一起,所以kapacitor的对象也在。

[root@IoT-M01 kapacitor]# kubectl get all -n kapacitor
NAME                                         READY   STATUS    RESTARTS   AGE
pod/chronograf-chronograf-668667875f-9skv6   1/1     Running   0          22m
pod/kapacitor-kapacitor-c8d85b7b6-9qvpg      1/1     Running   0          82m


NAME                            TYPE       CLUSTER-IP    EXTERNAL-IP   PORT(S)          AGE
service/chronograf-chronograf   NodePort   10.1.14.112   <none>        80:31003/TCP     61m
service/kapacitor-kapacitor     NodePort   10.1.242.75   <none>        9092:31002/TCP   82m


NAME                                    READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/chronograf-chronograf   1/1     1            1           61m
deployment.apps/kapacitor-kapacitor     1/1     1            1           82m

NAME                                               DESIRED   CURRENT   READY   AGE
replicaset.apps/chronograf-chronograf-668667875f   1         1         1       22m
replicaset.apps/kapacitor-kapacitor-c8d85b7b6      1         1         1       82m

posted on 2021-08-17 13:48  运维开发玄德公  阅读(21)  评论(0编辑  收藏  举报  来源

导航