首页 > 其他分享 >k8s helm方式部署夜莺监控系统

k8s helm方式部署夜莺监控系统

时间:2022-10-01 15:11:18浏览次数:52  
标签:k8s 夜莺 24h helm nightingale openebs root n9e

一、夜莺介绍

      Nightingale | 夜莺监控,一款先进的开源云原生监控分析系统,采用 All-In-One 的设计,集数据采集、可视化、监控告警、数据分析于一体,与云原生生态紧密集成,提供开箱即用的企业级监控分析和告警能力。于 2022 年 5 月 11 日,捐赠予中国计算机学会开源发展委员会(CCF ODC),为 CCF ODC 成立后接受捐赠的首个开源项目。

特性:

夜莺系统架构

官网地址:https://n9e.github.io/

官方文档:https://n9e.github.io/docs/prologue/introduction/

GitHub仓库地址:https://github.com/flashcatcloud/n9e-helm

二、安装部署openebs存储

克隆夜莺github项目到本地

git clone https://github.com/flashcatcloud/n9e-helm.git

安装openebs存储

openebs安装部署参考文档:https://blog.mafeifan.com/DevOps/K8s/k8s-%E5%9F%BA%E7%A1%80-%E5%AE%89%E8%A3%85OpenEBS.html#local-pv

kubectl apply -f https://openebs.github.io/charts/openebs-operator.yaml

kubectl patch storageclass openebs-hostpath  -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'    #设置openebs-hostpath为默认存储类

[root@sealyun-k8s-master-01 ~]# kubectl get pod -n openebs
NAME                                            READY   STATUS    RESTARTS   AGE
openebs-localpv-provisioner-6994cf5dd9-ct9ld    1/1     Running   7          20d
openebs-ndm-cluster-exporter-84bb5fc764-rf7jr   1/1     Running   3          20d
openebs-ndm-ksccz                               1/1     Running   2          20d
openebs-ndm-mtrds                               1/1     Running   2          20d
openebs-ndm-node-exporter-6sjh2                 1/1     Running   3          20d
openebs-ndm-node-exporter-7cvxl                 1/1     Running   4          20d
openebs-ndm-operator-5f8578c994-wds88           1/1     Running   3          20d
[root@sealyun-k8s-master-01 ~]# kubectl get sc -n openebs
NAME                         PROVISIONER        RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
openebs-device               openebs.io/local   Delete          WaitForFirstConsumer   false                  20d
openebs-hostpath (default)   openebs.io/local   Delete          WaitForFirstConsumer   false                  20d
[root@sealyun-k8s-master-01 ~]# 
[root@sealyun-k8s-master-01 ~]# 

三、通过helm安装部署夜莺监控系统

[root@sealyun-k8s-master-01 ~]# helm install nightingale ./n9e-helm -n n9e --create-namespace
NAME: nightingale
LAST DEPLOYED: Fri Sep 30 14:25:54 2022
NAMESPACE: n9e
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Please wait for several minutes for nightingale deployment to complete.
Then you should be able to visit the nightingale web at http://hello.n9e.info
For more details, please visit https://github.com/flashcat/n9e-helm
[root@sealyun-k8s-master-01 ~]#
[root@sealyun-k8s-master-01 ~]# 
[root@sealyun-k8s-master-01 ~]# 
[root@sealyun-k8s-master-01 ~]# kubectl get pod -n n9e
NAME                                   READY   STATUS    RESTARTS   AGE
nightingale-categraf-4vzcp             1/1     Running   84         24h
nightingale-categraf-9qzlw             1/1     Running   85         24h
nightingale-categraf-f6shc             1/1     Running   86         24h
nightingale-categraf-jblrk             1/1     Running   86         24h
nightingale-categraf-m54mr             1/1     Running   85         24h
nightingale-database-0                 1/1     Running   0          24h
nightingale-nserver-b8d66fb69-75blt    1/1     Running   6          24h
nightingale-nwebapi-679446f848-mg6b6   1/1     Running   6          24h
nightingale-prometheus-0               1/1     Running   0          24h
nightingale-redis-0                    1/1     Running   0          24h
[root@sealyun-k8s-master-01 ~]# kubectl get pvc -n n9e
NAME                                       STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS       AGE
data-nightingale-redis-0                   Bound    pvc-40b9f9d7-1cfa-4385-b9d8-8b461d2f8bda   1Gi        RWO            openebs-hostpath   24h
database-data-nightingale-database-0       Bound    pvc-4cafb849-a127-4097-8b4e-4495a7f98bba   4Gi        RWO            openebs-hostpath   24h
prometheus-data-nightingale-prometheus-0   Bound    pvc-41e89e56-aa6d-4f8d-95c2-80768b39b7be   4Gi        RWO            openebs-hostpath   24h
[root@sealyun-k8s-master-01 ~]# kubectl get pv -n n9e
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                                          STORAGECLASS       REASON   AGE
pvc-40b9f9d7-1cfa-4385-b9d8-8b461d2f8bda   1Gi        RWO            Delete           Bound    n9e/data-nightingale-redis-0                   openebs-hostpath            24h
pvc-41e89e56-aa6d-4f8d-95c2-80768b39b7be   4Gi        RWO            Delete           Bound    n9e/prometheus-data-nightingale-prometheus-0   openebs-hostpath            24h
pvc-4cafb849-a127-4097-8b4e-4495a7f98bba   4Gi        RWO            Delete           Bound    n9e/database-data-nightingale-database-0       openebs-hostpath            24h
[root@sealyun-k8s-master-01 ~]# 

编辑service文件,配置NodePort,让外部访问

[root@sealyun-k8s-master-01 ~]# kubectl get svc -n n9e
NAME                     TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
nightingale-database     ClusterIP   10.101.85.240   <none>        3306/TCP       24h
nightingale-nserver      ClusterIP   10.107.203.36   <none>        80/TCP         24h
nightingale-nwebapi      ClusterIP   10.111.55.177   <none>        80/TCP         24h
nightingale-prometheus   ClusterIP   10.99.128.168   <none>        9090/TCP       24h
nightingale-redis        ClusterIP   10.108.49.114   <none>        6379/TCP       24h
[root@sealyun-k8s-master-01 ~]# 
[root@sealyun-k8s-master-01 ~]# 
[root@sealyun-k8s-master-01 ~]# 
[root@sealyun-k8s-master-01 ~]# kubectl edit svc -n n9e nightingale-nwebapi
# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: v1
kind: Service
metadata:
  annotations:
    meta.helm.sh/release-name: nightingale
    meta.helm.sh/release-namespace: n9e
  creationTimestamp: "2022-09-30T06:25:58Z"
  labels:
    app: n9e
    app.kubernetes.io/managed-by: Helm
    chart: nightingale
    heritage: Helm
    release: nightingale
  name: nightingale-nwebapi
  namespace: n9e
  resourceVersion: "4892288"
  selfLink: /api/v1/namespaces/n9e/services/nightingale-nwebapi
  uid: 000a6a3d-c55a-48a6-99dd-7de5f01ba500
spec:
  clusterIP: 10.111.55.177
  externalTrafficPolicy: Cluster
  ports:
  - name: nwebapi-port
    port: 80
    protocol: TCP
    targetPort: 18000
  selector:
    app: n9e
    component: nwebapi
    release: nightingale
  sessionAffinity: None
  type: ClusterIP  #修此处改为NodePort
status:
  loadBalancer: {}

[root@sealyun-k8s-master-01 ~]# kubectl get svc -n n9e
NAME                     TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
nightingale-database     ClusterIP   10.101.85.240   <none>        3306/TCP       24h
nightingale-nserver      ClusterIP   10.107.203.36   <none>        80/TCP         24h
nightingale-nwebapi      NodePort    10.111.55.177   <none>        80:53003/TCP   24h
nightingale-prometheus   ClusterIP   10.99.128.168   <none>        9090/TCP       24h
nightingale-redis        ClusterIP   10.108.49.114   <none>        6379/TCP       24h
[root@sealyun-k8s-master-01 ~]# 

此时可以通过NodePort端口访问夜莺监控系统

http://172.16.88.181   root  root.2020

 

标签:k8s,夜莺,24h,helm,nightingale,openebs,root,n9e
From: https://www.cnblogs.com/cyh00001/p/16747224.html

相关文章

  • k8s部署canal-server使用configMap挂载方式报Read Only file System
    k8s部署canal-server使用configMap挂载方式报ReadOnlyfileSystem1.1、问题复现由于部署canal-server时,需要修改主库master的数据库连接信息以及配置zookeeper,所以为了......
  • k8s发布-jenkins流水线构建
    一、需求:使用jenkins流水线构建应用,发布至k8s二、发布流程:从gitlab仓库拉取代码--》代码编译、打包--》制作镜像并上传至镜像仓库--》发布至k8s三、安装所需插件jen......
  • k8s ingress实现灰度发布
    一、方案:使用ingress实现应用的灰度发布说明:此灰度发布方法不适用于利用网关转发服务的架构,利用网关转发的架构,需在网关实现灰度。灰度流程:1、服务端:版本v1正常运行,发布......
  • k8s+log-pilot日志收集
    github地址:https://github.com/AliyunContainerService/log-pilot介绍log-pilot是一个很棒的docker日志工具。可以从dockerlog-pilot主机收集日志并将它们发送到您的......
  • 【Kubernetes】K8s笔记(四):从 Job 和 CronJob 看 Kubernetes 的设计理念
    0.前言:在线业务和离线业务Kubernetes的业务可以分为两大类:在线业务和离线业务。在线业务:像Nginx、MySQL这样长时间运行的业务,这些应用一旦运行起来,除非出错或者停......
  • k8s 中 Pod 的控制器
    k8s中Pod的控制器前言ReplicationControllerReplicaSetDeployment更新Deployment回滚deploymentStatefulSetDaemonSetJob和CronJob总结参考k8......
  • 【k8s】K8S部署Pod到指定节点
    在启动Pod的yaml文件中与containers同级别的位置添加如下两行:nodeSelector:kubernetes.io/hostname:node的IP地址或主机名......
  • k8s消息队列-rabbiMQ集群(pod初始化安装消息延迟插件)
    一、方案:在k8s上部署rabbitMQ集群,pod初始化时安装消息延迟插件。二、部署参考rabbitMQ官方:https://www.rabbitmq.com/kubernetes/operator/operator-overview.html1、部......
  • k8s-node节点详解
    概念node是k8s集群的一个服务器角色,一般分为master(管理节点)和work(工作节点),master节点负责服务调度控制以及存储集群的配置信息等,node节点负责运行k8s的各种资源,比如:pod,D......
  • k8s网络-ingress
    一、方案:以daemonSet方式部署ingress-nginx-controller在k8s各节点上,并基于主机网络。二、部署参考:https://kubernetes.github.io/ingress-nginx/deploy/https://githu......