首页 > 其他分享 >k8s容器秒级事件监控软件-Kube-eventer

k8s容器秒级事件监控软件-Kube-eventer

时间:2024-02-06 12:24:21浏览次数:32  
标签:kind kube name system eventer 秒级 Kube metadata

下面是kube-eventer的github开源地址:

https://github.com/AliyunContainerService/kube-eventer

 

---
apiVersion: v1
data:
  content: >-
    {"EventType": "{{ .Type }}","EventNamespace": "{{
    .InvolvedObject.Namespace }}","EventKind": "{{ .InvolvedObject.Kind }}","EventObject": "{{
    .InvolvedObject.Name }}","EventReason": "{{
    .Reason }}","EventTime": "{{ .LastTimestamp }}","EventMessage": "{{ .Message
    }}"}
kind: ConfigMap
metadata: 
  name: kubeeventer-webhook
  namespace: kube-system 



---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    name: kube-eventer
  name: kube-eventer-webhook
  namespace: kube-system
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kube-eventer
  template:
    metadata:
      labels:
        app: kube-eventer
      annotations:    
        scheduler.alpha.kubernetes.io/critical-pod: ''
    spec:
      dnsPolicy: ClusterFirstWithHostNet
      serviceAccount: kube-eventer
      containers:
        - image: registry.aliyuncs.com/acs/kube-eventer:v1.2.7-ca03be0-aliyun
#        - image: registry.us-west-1.aliyuncs.com/acs/kube-eventer:v1.2.7-ca03be0-aliyun
          name: kube-eventer
          command:
            - "/kube-eventer"
            - "--source=kubernetes:https://test-cnk8s.boge.com:6443"
            ## .e.g,dingtalk sink demo
            #- --sink=dingtalk:[your_webhook_url]&label=[your_cluster_id]&level=[Normal or Warning(default)]&namespaces=[kube-system,kae-app(all)]
            - --sink=webhook:http://alertmanaer-dingtalk-svc.kube-system/b01bdc063/boge/getjson?level=Warning&kinds=Pod&method=POST&header=Content-Type=application/json&custom_body_configmap=kubeeventer-webhook&custom_body_configmap_namespace=kube-system

          env:
          # If TZ is assigned, set the TZ value as the time zone
          - name: TZ
            value: "Asia/Shanghai" 
          volumeMounts:
            - name: localtime
              mountPath: /etc/localtime
              readOnly: true
            - name: zoneinfo
              mountPath: /usr/share/zoneinfo
              readOnly: true
          resources:
            requests:
              cpu: 100m
              memory: 100Mi
            limits:
              cpu: 500m
              memory: 250Mi
      hostAliases:
      - hostnames:
        - test-cnk8s.boge.com
        ip: 10.0.1.201
      volumes:
        - name: localtime
          hostPath:
            path: /etc/localtime
        - name: zoneinfo
          hostPath:
            path: /usr/share/zoneinfo
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: kube-eventer
rules:
  - apiGroups:
      - ""
    resources:
      - configmaps
      - events
    verbs:
      - get
      - list
      - watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: kube-eventer
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: kube-eventer
subjects:
  - kind: ServiceAccount
    name: kube-eventer
    namespace: kube-system
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: kube-eventer
  namespace: kube-system

 

标签:kind,kube,name,system,eventer,秒级,Kube,metadata
From: https://www.cnblogs.com/libruce/p/18009514

相关文章

  • kubelet 组件内存高排查方法
    1、查看服务进程,并跟踪程序系统调用pgrep kubelet#查看资源占用情况top-p 95786strace-cp95786#显示时间戳strace-tt-p95786 2、用pprof性能分析工具排查#安装go环境#启动代理kubectlproxy--port=8001--address=0.0.0.0curl-sK-vhttp://127.0.0.1:8001/......
  • 服务器-Kubernetes (K8S)单机部署实战 -- 001
       本篇博文是centos7系统安装kubernetes单机master节点操作。一:查看服务器配置信息   1.执行命令查看服务器cpu信息。安装kubernetes服务,cpu核心数必须大于2,内存大于2G。lscpu   2. 修改服务器设置信息,避免安装出现问题。    a.......
  • Kubernetes 服务类型详解
    Kubernetes服务类型详解如今,Kubernetes已成为管理和扩展云原生应用程序的强大工具。组织需要利用高度可扩展且始终可用的功能来保持零停机时间,快速部署他们的软件。随着越来越多的应用程序被容器化和部署,容器的管理也变得越来越复杂。因此,软件的扩展成为一个问题,而这正是Kuber......
  • KubeEdge v1.16.0 版本发布!10项新增特性
    本文分享自华为云社区《KubeEdgev1.16.0版本发布!集群升级部署易用性大幅提升》,作者:容器大未来。北京时间2024年1月23日,KubeEdge发布1.16.0版本。新版本新增多个增强功能,在集群升级、集群易用性、边缘设备管理等方面均有大幅提升。KubeEdgev1.16.0新增特性:集群升级:支......
  • 在K8S中,Kubernetes与Docker的关系?
    在Kubernetes(简称K8s)与Docker之间,存在一种互补和依赖的关系:互补关系:Docker:提供容器化解决方案,允许开发人员将应用及其依赖打包到可移植的容器镜像中。Docker主要负责构建、运行和分发这些容器。Kubernetes:是一个容器编排系统,它的目标是自动化部署、扩展以及管理容器化的应用......
  • 在K8S中,Minikube、Kubectl、Kubelet是什么?
    在Kubernetes(简称K8s)生态系统中,Minikube、kubectl和kubelet是三个不同的组件,各自扮演着不同的角色:Minikube:Minikube是一个工具,用于在单个节点上部署一个本地的Kubernetes集群。这对于开发者在本地开发环境进行Kubernetes应用测试和调试非常有用。它能够在个人计算机上启动一个......
  • kuberentes安装
    Sealos安装集群下载Sealos#推荐下载最新版,会修复一些BUG,下载并安装sealos,sealos是个golang的二进制工具,直接下载拷贝到bin目录即可,release页面也可下载wget-chttps://sealyun.oss-cn-beijing.aliyuncs.com/latest/sealos&&\chmod+xsealos&&mvsealos/usr/b......
  • Distribute tensorflow model training on a kubernetes cluster
    [ERRRO:AttributeError:module'tensorflow'hasnoattribute'app'](base)maye@maye-Inspiron-5547:~/github_repository/tensorflow_ecosystem/distribution_strategy$kubectldescribepoddist-strat-example-worker-0-w6rsbName:......
  • KubeEdge EdgeMark 测试环境从零开始搭建
    https://blog.csdn.net/u010549795/article/details/132557648 EdgeMark测试环境从零开始搭建KubeEdge也提供了类似KubeMark的模拟大规模集群的工具,值得注意的是目前EdgeMark只能模拟edgecore,无法模拟edgemesh,所以如果是对网络方面的测试,还是建议老老实实装虚拟机环境配置使用v......
  • Run a tfx pipeline using kubeflow pipeline
    1.whatiskubeflowpipelinefortfxpipeline?kubeflowpipelineisanochetratoroftfxpipeline,whichrunsonakubernetescluster.LocalDagRunerisanorchetratoroftfxpipeline,whichrunslocal.#runatfxpipelineusgingLocalGagRunnertfx.orc......