首页 > 其他分享 >K8s - Helm的使用

K8s - Helm的使用

时间:2024-10-21 23:10:04浏览次数:5  
标签:k8s root Chart helm master 使用 Helm K8s chartdemo

安装Helm

[root@k8s-master ~]# tar -xvzf helm-v3.16.2-linux-amd64.tar.gz 
linux-amd64/
linux-amd64/LICENSE
linux-amd64/helm
linux-amd64/README.md
[root@k8s-master ~]# mv linux-amd64/helm /usr/local/bin
[root@k8s-master ~]# 
[root@k8s-master ~]# helm version
version.BuildInfo{Version:"v3.16.2", GitCommit:"13654a52f7c70a143b1dd51416d633e1071faffb", GitTreeState:"clean", GoVersion:"go1.22.7"}
[root@k8s-master ~]# 

Helm国内镜像源

# 移除原先的stable源并增加国内镜像源
[root@k8s-master ~]# helm repo remove stable
"stable" has been removed from your repositories
[root@k8s-master ~]# 
[root@k8s-master ~]# helm repo add azure http://mirror.azure.cn/kubernetes/charts
"azure" has been added to your repositories
[root@k8s-master ~]# helm repo add aliyun https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
"aliyun" has been added to your repositories
[root@k8s-master ~]# helm repo add offical https://charts.helm.sh/incubator
"offical" has been added to your repositories
[root@k8s-master ~]#

# 列出已配置的Helm库
[root@k8s-master ~]# helm repo list
NAME    URL                                                   
azure   http://mirror.azure.cn/kubernetes/charts              
aliyun  https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
offical https://charts.helm.sh/incubator                      
[root@k8s-master ~]# 

# 搜索测试
[root@k8s-master ~]# helm search repo nginx
NAME                            CHART VERSION   APP VERSION     DESCRIPTION                                       
aliyun/nginx-ingress            0.9.5           0.10.2          An nginx Ingress controller that uses ConfigMap...
aliyun/nginx-lego               0.3.1                           Chart for nginx-ingress-controller and kube-lego  
azure/nginx-ingress             1.41.3          v0.34.1         DEPRECATED! An nginx Ingress controller that us...
azure/nginx-ldapauth-proxy      0.1.6           1.13.5          DEPRECATED - nginx proxy with ldapauth            
azure/nginx-lego                0.3.1                           Chart for nginx-ingress-controller and kube-lego  
aliyun/gcloud-endpoints         0.1.0                           Develop, deploy, protect and monitor your APIs ...
azure/gcloud-endpoints          0.1.2           1               DEPRECATED Develop, deploy, protect and monitor...
[root@k8s-master ~]# 
[root@k8s-master ~]# helm search hub nginx |head
URL                                                     CHART VERSION   APP VERSION                             DESCRIPTION                                       
https://artifacthub.io/packages/helm/krakazyabr...      1.0.0           1.19.0                                  Nginx Helm chart for Kubernetes                   
https://artifacthub.io/packages/helm/bitnami/nginx      18.2.3          1.27.2                                  NGINX Open Source is a web server that can be a...
https://artifacthub.io/packages/helm/dysnix/nginx       7.1.8           1.19.4                                  Chart for the nginx server                        
https://artifacthub.io/packages/helm/bitnami-ak...      13.2.12         1.23.2                                  NGINX Open Source is a web server that can be a...
https://artifacthub.io/packages/helm/ashu-nginx...      0.1.0           1.16.0                                  A Helm chart for Kubernetes                       
https://artifacthub.io/packages/helm/test-nginx...      0.1.0           1.16.0                                  A Helm chart for Kubernetes                       
https://artifacthub.io/packages/helm/shubhamtat...      0.1.12          1.19.6                                  Nginx Helm chart for Kubernetes                   
https://artifacthub.io/packages/helm/dhinesh/nginx      18.2.2          1.27.2                                  NGINX Open Source is a web server that can be a...
https://artifacthub.io/packages/helm/wiremind/n...      2.1.1                                                   An NGINX HTTP server                              
[root@k8s-master ~]# 

# 更新本地chart库信息
[root@k8s-master ~]# helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "aliyun" chart repository
...Successfully got an update from the "offical" chart repository
...Successfully got an update from the "azure" chart repository
Update Complete. ⎈Happy Helming!⎈
[root@k8s-master ~]# 

一些Helm命令

helm search repo <chart-name> -o yaml   # 从repo查找Chart
helm search hub <chart-name> -o yaml    # 从hub查找Chart
helm show all <chart-name>              # 查看Chart详情

helm lint <chart-dir>       # 检查依赖和模版配置
helm package <chart-dir>    # 打包应用

helm install <release-name> ./<chart-dir>                                # 离线部署
helm install <release-name> ./<chart-dir> -f ./<file-dir>/<file>.yaml    # 根据配置文件离线部署

制作Chart模版

创建Chart模版,作为制作新Chart的参考和基础。

[root@k8s-master ~]# helm create chart-demo
Creating chart-demo
[root@k8s-master ~]# tree chart-demo/
chart-demo/
├── charts
├── Chart.yaml
├── templates
│   ├── deployment.yaml
│   ├── _helpers.tpl
│   ├── hpa.yaml
│   ├── ingress.yaml
│   ├── NOTES.txt
│   ├── serviceaccount.yaml
│   ├── service.yaml
│   └── tests
│       └── test-connection.yaml
└── values.yaml

3 directories, 10 files
[root@k8s-master ~]# 

Chart模版目录结构说明

├── charts # 可选目录,存放与当前Chart相关的子Chart
├── Chart.yaml # 用于描述 Chart 信息,如名称、版本、描述等
├── templates # 主要用于存放Kubernetes资源的模板文件
│   ├── deployment.yaml # Kubernetes资源文件
│   ├── _helpers.tpl # 存放 Helm 模板函数,可以在模板文件中重复使用,以简化模板文件的编写,并提高可维护性
│   ├── hpa.yaml
│   ├── ingress.yaml # Kubernetes资源文件
│   ├── NOTES.txt # 在安装或升级 Chart 后显示的提示和说明
│   ├── serviceaccount.yaml # Kubernetes资源文件
│   ├── service.yaml # Kubernetes资源文件
│   └── tests
│       └── test-connection.yaml
└── values.yaml # 用于定义Chart的默认值,通常在模板文件中引用,可以在安装 Chart时修改这些值,以灵活地改变应用程序的配置

一些配置字段说明

apiVersion: Chart API 版本
name: 名称
description: 简要描述
type: 类型
version: 版本号
appVersion: 应用程序的版本号
replicas: 定义默认的副本数
image: 镜像仓库地址和标签
service: Service类型、端口和目标端口

双花括号"{{}}"            用于定义和插入变量、表达式和函数
“.Release.Name”           内置变量,用于安装Chart时指定的Release名称
以".Values"开头的变量      用于引用在 values.yaml 文件中定义的变量
双花括号"{{}}"中的横杠“-”  用于去除表达式执行后遗留的空白行,使得渲染的结果更加紧凑和美观

语法说明

indent函数   缩进空格,可以指定空格数目
nindent函数  先添加一个换行再缩进空格,可以指定空格数目
toYaml函数   用于将values.yaml文件中的片段插入模版文件中的指定位置
range函数    用于遍历数组、对象等数据结构
include函数  用来引用_helpers.tpl文件中的模版代码

{{if}}...{{end}}    
条件判断,用于根据不同的条件生成不同的内容,结合配置中的布尔型字段使用

{{with}}...{{end}}
用于创建一个局部作用域,在这个作用域中执行特定的模块代码块
在with块内不支持引用外部变量,但可以在with块之前定义一个变量,但并在内部引用该变量
如果with的变量未定义或者为空,with函数将不执行里面的模块代码块,
可以将一些不常用的配置设置为空,用户可以运行helm命令时,通过--set参数来自定义

内置对象".Files”,用于将文件内容插入模板中的指定位置处
“.Files.Get”方法读取文件内容并将其插入当前位置
“.Files.Glob”方法获取匹配指定通配符模式的文件列表,并通过range函数遍历这些文件以读取其内容

创建Chart

[root@k8s-master ~]# kubectl create namespace test-helm
namespace/test-helm created
[root@k8s-master ~]# 

创建目录及文件

[root@k8s-master ~]# cd helm-chartdemo/
[root@k8s-master helm-chartdemo]# tree
.
├── Chart.yaml
├── templates
│   ├── deployment.yaml
│   ├── NOTES.txt
│   └── service.yaml
└── values.yaml

1 directory, 5 files
[root@k8s-master helm-chartdemo]# 
[root@k8s-master helm-chartdemo]# cat Chart.yaml 
apiVersion: v2 
name: helm-chartdemo
description: A Helm chart for Kubernetes 
type: application 
version: 0.1.0 
appVersion: "1.16.0"
[root@k8s-master helm-chartdemo]# 
[root@k8s-master helm-chartdemo]# cat values.yaml 
replicas: 1
image:
  repository: nginx
  tag: latest
service:
  type: ClusterIP
  port: 80
  targetPort: 80
[root@k8s-master helm-chartdemo]# 
[root@k8s-master helm-chartdemo]# cat templates/deployment.yaml 
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ .Release.Name }} 
spec:
  replicas: {{ .Values.replicas }}
  selector:
    matchLabels:
      release-name: {{ .Release.Name }}
  template:
    metadata:
      labels:
        release-name: {{ .Release.Name }}
    spec:
      containers:
      - image: {{ .Values.image.repository }}:{{ .Values.image.tag }} 
        name: web
[root@k8s-master helm-chartdemo]# 
[root@k8s-master helm-chartdemo]# cat templates/NOTES.txt 
欢迎使用Chart!这是一个Helm Chart 的 Demo !
[root@k8s-master helm-chartdemo]# 
[root@k8s-master helm-chartdemo]# cat templates/service.yaml 
apiVersion: v1
kind: Service
metadata:
  name: {{ .Release.Name }} 
spec:
  type: {{ .Values.service.type }}
  selector:
    release-name: {{ .Release.Name }}
  ports:
    - protocol: TCP
      port: {{ .Values.service.port }}
      targetPort: {{ .Values.service.targetPort }}
[root@k8s-master helm-chartdemo]# 

安装Chart及查看Release

# 从本地安装
[root@k8s-master helm-chartdemo]# helm install chartdemo . -n test-helm
NAME: chartdemo
LAST DEPLOYED: Wed Oct 16 10:21:05 2024
NAMESPACE: test-helm
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
欢迎使用Chart!这是一个Helm Chart 的 Demo !
[root@k8s-master helm-chartdemo]# 

# 查看Release等信息
[root@k8s-master helm-chartdemo]# helm list -n test-helm
NAME            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                   APP VERSION
chartdemo       test-helm       1               2024-10-16 10:21:05.380344629 +0800 CST deployed        helm-chartdemo-0.1.0    1.16.0     
[root@k8s-master helm-chartdemo]# 
[root@k8s-master helm-chartdemo]# kubectl get po,deploy,svc -n test-helm -o wide
NAME                             READY   STATUS    RESTARTS   AGE   IP               NODE         NOMINATED NODE   READINESS GATES
pod/chartdemo-86697c564b-mfjzr   1/1     Running   0          18m   10.244.235.205   k8s-master   <none>           <none>

NAME                        READY   UP-TO-DATE   AVAILABLE   AGE   CONTAINERS   IMAGES         SELECTOR
deployment.apps/chartdemo   1/1     1            1           18m   web          nginx:latest   release-name=chartdemo

NAME                TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE   SELECTOR
service/chartdemo   ClusterIP   10.96.229.216   <none>        80/TCP    18m   release-name=chartdemo
[root@k8s-master helm-chartdemo]# 

动态更新values.yaml值

[root@k8s-master helm-chartdemo]# helm install chartdemo2 . --set service.type=NodePort -n test-helm
NAME: chartdemo2
LAST DEPLOYED: Wed Oct 16 10:50:40 2024
NAMESPACE: test-helm
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
欢迎使用Chart!这是一个Helm Chart 的 Demo !
[root@k8s-master helm-chartdemo]# 
[root@k8s-master helm-chartdemo]# helm list -n test-helm
NAME            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                   APP VERSION
chartdemo       test-helm       1               2024-10-16 10:21:05.380344629 +0800 CST deployed        helm-chartdemo-0.1.0    1.16.0     
chartdemo2      test-helm       1               2024-10-16 10:50:40.287432354 +0800 CST deployed        helm-chartdemo-0.1.0    1.16.0     
[root@k8s-master helm-chartdemo]# 
[root@k8s-master helm-chartdemo]# kubectl get po,deploy,svc -n test-helm -o wide
NAME                              READY   STATUS    RESTARTS   AGE   IP               NODE         NOMINATED NODE   READINESS GATES
pod/chartdemo-86697c564b-mfjzr    1/1     Running   0          30m   10.244.235.205   k8s-master   <none>           <none>
pod/chartdemo2-7b65dfd898-z7775   1/1     Running   0          69s   10.244.235.206   k8s-master   <none>           <none>

NAME                         READY   UP-TO-DATE   AVAILABLE   AGE   CONTAINERS   IMAGES         SELECTOR
deployment.apps/chartdemo    1/1     1            1           30m   web          nginx:latest   release-name=chartdemo
deployment.apps/chartdemo2   1/1     1            1           69s   web          nginx:latest   release-name=chartdemo2

NAME                 TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE   SELECTOR
service/chartdemo    ClusterIP   10.96.229.216   <none>        80/TCP         30m   release-name=chartdemo
service/chartdemo2   NodePort    10.104.7.166    <none>        80:30456/TCP   69s   release-name=chartdemo2
[root@k8s-master helm-chartdemo]# 

更新、回滚和卸载 Release

# 当前状态
[root@k8s-master helm-chartdemo]# helm list -n test-helm
NAME            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                   APP VERSION
chartdemo       test-helm       1               2024-10-16 10:21:05.380344629 +0800 CST deployed        helm-chartdemo-0.1.0    1.16.0     
[root@k8s-master helm-chartdemo]# 
[root@k8s-master helm-chartdemo]# helm history chartdemo -n test-helm
REVISION        UPDATED                         STATUS          CHART                   APP VERSION     DESCRIPTION     
1               Wed Oct 16 10:21:05 2024        deployed        helm-chartdemo-0.1.0    1.16.0          Install complete
[root@k8s-master helm-chartdemo]# 
[root@k8s-master helm-chartdemo]# kubectl get po,deploy,svc -n test-helm -o wide
NAME                             READY   STATUS    RESTARTS   AGE   IP               NODE         NOMINATED NODE   READINESS GATES
pod/chartdemo-86697c564b-mfjzr   1/1     Running   0          44m   10.244.235.205   k8s-master   <none>           <none>

NAME                        READY   UP-TO-DATE   AVAILABLE   AGE   CONTAINERS   IMAGES         SELECTOR
deployment.apps/chartdemo   1/1     1            1           44m   web          nginx:latest   release-name=chartdemo

NAME                TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE   SELECTOR
service/chartdemo   ClusterIP   10.96.229.216   <none>        80/TCP    44m   release-name=chartdemo
[root@k8s-master helm-chartdemo]# 

# 更新 Release
[root@k8s-master helm-chartdemo]# helm upgrade chartdemo . --set replicas=3,service.type=NodePort -n test-helm
Release "chartdemo" has been upgraded. Happy Helming!
NAME: chartdemo
LAST DEPLOYED: Wed Oct 16 11:07:49 2024
NAMESPACE: test-helm
STATUS: deployed
REVISION: 2
TEST SUITE: None
NOTES:
欢迎使用Chart!这是一个Helm Chart 的 Demo !
[root@k8s-master helm-chartdemo]# 
[root@k8s-master helm-chartdemo]# helm history chartdemo -n test-helm
REVISION        UPDATED                         STATUS          CHART                   APP VERSION     DESCRIPTION     
1               Wed Oct 16 10:21:05 2024        superseded      helm-chartdemo-0.1.0    1.16.0          Install complete
2               Wed Oct 16 11:07:49 2024        deployed        helm-chartdemo-0.1.0    1.16.0          Upgrade complete
[root@k8s-master helm-chartdemo]# 
[root@k8s-master helm-chartdemo]# kubectl get po,deploy,svc -n test-helm -o wide
NAME                             READY   STATUS    RESTARTS   AGE   IP               NODE         NOMINATED NODE   READINESS GATES
pod/chartdemo-86697c564b-2nvq2   1/1     Running   0          11s   10.244.235.209   k8s-master   <none>           <none>
pod/chartdemo-86697c564b-ghp7d   1/1     Running   0          11s   10.244.235.208   k8s-master   <none>           <none>
pod/chartdemo-86697c564b-mfjzr   1/1     Running   0          46m   10.244.235.205   k8s-master   <none>           <none>

NAME                        READY   UP-TO-DATE   AVAILABLE   AGE   CONTAINERS   IMAGES         SELECTOR
deployment.apps/chartdemo   3/3     3            3           46m   web          nginx:latest   release-name=chartdemo

NAME                TYPE       CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE   SELECTOR
service/chartdemo   NodePort   10.96.229.216   <none>        80:31710/TCP   46m   release-name=chartdemo
[root@k8s-master helm-chartdemo]# 


# 回滚 Release
[root@k8s-master helm-chartdemo]# helm rollback chartdemo -n test-helm
Rollback was a success! Happy Helming!
[root@k8s-master helm-chartdemo]# 
[root@k8s-master helm-chartdemo]# kubectl get po,deploy,svc -n test-helm -o wide
NAME                             READY   STATUS    RESTARTS   AGE   IP               NODE         NOMINATED NODE   READINESS GATES
pod/chartdemo-86697c564b-mfjzr   1/1     Running   0          50m   10.244.235.205   k8s-master   <none>           <none>

NAME                        READY   UP-TO-DATE   AVAILABLE   AGE   CONTAINERS   IMAGES         SELECTOR
deployment.apps/chartdemo   1/1     1            1           50m   web          nginx:latest   release-name=chartdemo

NAME                TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE   SELECTOR
service/chartdemo   ClusterIP   10.96.229.216   <none>        80/TCP    50m   release-name=chartdemo
[root@k8s-master helm-chartdemo]# 
[root@k8s-master helm-chartdemo]# helm history chartdemo -n test-helm
REVISION        UPDATED                         STATUS          CHART                   APP VERSION     DESCRIPTION     
1               Wed Oct 16 10:21:05 2024        superseded      helm-chartdemo-0.1.0    1.16.0          Install complete
2               Wed Oct 16 11:07:49 2024        superseded      helm-chartdemo-0.1.0    1.16.0          Upgrade complete
3               Wed Oct 16 11:11:05 2024        deployed        helm-chartdemo-0.1.0    1.16.0          Rollback to 1   
[root@k8s-master helm-chartdemo]# 
[root@k8s-master helm-chartdemo]# helm rollback chartdemo 2 -n test-helm
Rollback was a success! Happy Helming!
[root@k8s-master helm-chartdemo]# 
[root@k8s-master helm-chartdemo]# helm history chartdemo -n test-helm
REVISION        UPDATED                         STATUS          CHART                   APP VERSION     DESCRIPTION     
1               Wed Oct 16 10:21:05 2024        superseded      helm-chartdemo-0.1.0    1.16.0          Install complete
2               Wed Oct 16 11:07:49 2024        superseded      helm-chartdemo-0.1.0    1.16.0          Upgrade complete
3               Wed Oct 16 11:11:05 2024        superseded      helm-chartdemo-0.1.0    1.16.0          Rollback to 1   
4               Wed Oct 16 11:13:05 2024        deployed        helm-chartdemo-0.1.0    1.16.0          Rollback to 2   
[root@k8s-master helm-chartdemo]# 
[root@k8s-master helm-chartdemo]# kubectl get po,deploy,svc -n test-helm -o wide
NAME                             READY   STATUS    RESTARTS   AGE   IP               NODE         NOMINATED NODE   READINESS GATES
pod/chartdemo-86697c564b-dtczs   1/1     Running   0          9s    10.244.235.210   k8s-master   <none>           <none>
pod/chartdemo-86697c564b-mfjzr   1/1     Running   0          52m   10.244.235.205   k8s-master   <none>           <none>
pod/chartdemo-86697c564b-vl8lk   1/1     Running   0          9s    10.244.235.211   k8s-master   <none>           <none>

NAME                        READY   UP-TO-DATE   AVAILABLE   AGE   CONTAINERS   IMAGES         SELECTOR
deployment.apps/chartdemo   3/3     3            3           52m   web          nginx:latest   release-name=chartdemo

NAME                TYPE       CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE   SELECTOR
service/chartdemo   NodePort   10.96.229.216   <none>        80:31650/TCP   52m   release-name=chartdemo
[root@k8s-master helm-chartdemo]# 

# 删除 Release
[root@k8s-master helm-chartdemo]# helm list -n test-helm
NAME            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                   APP VERSION
chartdemo       test-helm       4               2024-10-16 11:13:05.336732826 +0800 CST deployed        helm-chartdemo-0.1.0    1.16.0     
[root@k8s-master helm-chartdemo]# 
[root@k8s-master helm-chartdemo]# helm uninstall chartdemo -n test-helm
release "chartdemo" uninstalled
[root@k8s-master helm-chartdemo]# 
[root@k8s-master helm-chartdemo]# helm list -n test-helm
NAME    NAMESPACE       REVISION        UPDATED STATUS  CHART   APP VERSION
[root@k8s-master helm-chartdemo]# 

自建Chart仓库

在实际使用中通常使用Nexus3、Harbor,JFrog等制品库工具来自建Chart仓库。
如果想单独部署一个纯粹的Chart仓库,可以使用ChartMuseum(Helm开源的Chart仓库服务)。


标签:k8s,root,Chart,helm,master,使用,Helm,K8s,chartdemo
From: https://www.cnblogs.com/anliven/p/18491594

相关文章

  • 【Jmeter】工具安装及使用
    安装JmeterJmeter依赖于JDK,所以必须确保当前计算机上已经安装了JDK,并且配置了环境变量。下载可以ApacheJmeter官网下载,地址:ApacheJMeter-DownloadApacheJMeter解压因为下载的是zip包,解压缩即可使用,目录结构如下:其中的bin目录就是执行的脚本,其中包含启动脚本:......
  • 使用mmap()创建内存映射
    系统调用(mmap和munmap)mmap内存映射类型mmap()系统调用用于在调用进程的虚拟地址空间中创建内存映射,主要分为两种类型:文件映射:将文件的一部分直接映射到虚拟内存中,允许通过内存访问文件内容,映射的分页会在需要时自动加载匿名映射:没有对应文件,分页初始化为0,可以视为一......
  • IPv6的使用
    本文主要介绍ipv6的使用首先检测公网IP信息,如果公网IPv6地址正常,那么可以关闭页面了公网IP检测1公网IP检测2光猫路由改桥接首先你得有个光猫管理员账号密码(百度搜索或者咨询客服,eg:移动HG光猫破解)使用管理员账号密码进入光猫后台,一般进入网络菜单,选择3_INTERNET_R_VID_4......
  • 使用Flask实现本机的模型部署
    前言        模型部署是指将大模型运行在专属的计算资源上,使模型在独立的运行环境中高效、可靠地运行,并为业务应用提供推理服务。其目标是将机器学习模型应用于实际业务中,使最终用户或系统能够利用模型的输出,从而发挥其作用。一、设置客户端运行之前要先运行服务端......
  • ELK04 ELK综合案例, logstash写入mysql, kibana访问验证 ubuntu使用
    6ELK综合实战案例6.1Filebeat收集Nginx日志利用Redis缓存发送至Elasticsearch 图上ip地址仅供参考6.1.2.2修改Filebeat配置#安装redis(访问0.0.0.0和密码123456),nginx(访问日志json格式)[root@ubuntu~]#vim/etc/filebeat/filebeat.ymlfilebeat.inputs:-......
  • 使用Verilog设计分频模块(2Hz)
         在数字电路设计中,分频器是一种常见的电路,用于将一个高频的时钟信号分频到一个较低频率的时钟信号。本次将通过一个实际的例子,讲解如何使用Verilog语言设计一个分频器,将系统时钟信号分频到2Hz。        在数字电路系统的设计中,分频器是一种应用十分广泛......
  • ELK02 Filebeat收集数据, Kibana安装基础管理 ubuntu使用
    3Beats收集数据Beats是一些工具集,包括以下,其中filebeat应用最为广泛filebeat:收集日志文件数据。最常用的工具packetbeat:用于收集网络数据。一般用zabbix实现此功能metricbeat:从OS和服务收集指标数据,比如系统运行状态、CPU内存利用率等。winlogbeat:从Windows平......
  • koa2 入门(1)koa-generator 脚手架和 mongoose 使用
    koa2入门(1)koa-generator脚手架和mongoose使用 项目地址:https://github.com/caochangkui/demo/tree/koa2-learn1构建项目1.1安装koa-generator$npminstall-gkoa-generator1.2使用koa-generator生成koa2项目$koa2-eproject(项目名称)(-e代表使用模板引......
  • ELK01 Elasticsearch部署和管理,集群工作机制 ubuntu使用
    企业级日志分析系统ELK1.1.1什么是ELK1.Elasticsearch是一个实时的全文搜索,存储库和分析引擎。2.Logstash是数据处理的管道,能够同时从多个来源采集数据,转换数据,然后将数据发送到诸如Elasticsearch等存储库中。(java开发,有数据处理能力,比较重)3.Kibana则可以让用户......
  • Flux.merge 使用说明书
    mergepublicstatic <T> Flux<T> merge(Publisher<?extendsPublisher<?extendsT>> source,int concurrency)Mergedatafrom Publisher sequencesemittedbythepassed Publisher intoaninterl......