k8s的heapster项目中止以后, 事件收集的项目,就推荐使用https://github.com/heptiolabs/eventrouter项目了

Eventrouter

This repository contains a simple event router for the Kubernetes project. The event router serves as an active watcher of event resource in the kubernetes system, which takes those events and pushes them to a user specified sink. This is useful for a number of different purposes, but most notably long term behavioral analysis of your workloads running on your kubernetes cluster.

Goals

This project has several objectives, which include:

  • Persist events for longer period of time to allow for system debugging
  • Allows operators to forward events to other system(s) for archiving/ML/introspection/etc.
  • It should be relatively low overhead
  • Support for multiple sinks should be configurable

NOTE:

By default, eventrouter is configured to leverage existing EFK stacks by outputting wrapped json object which are easy to index in elastic search.

#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: v1
kind: ServiceAccount
metadata:
  name: eventrouter
  namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
  name: eventrouter
rules:
- apiGroups: [""]
  resources: ["events"]
  verbs: ["get", "watch", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: eventrouter
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: eventrouter
subjects:
- kind: ServiceAccount
  name: eventrouter
  namespace: kube-system
---
apiVersion: v1
data:
  config.json: |-
    {
      "sink": "kafka",
      "kafkaBrokers": ["10.17.145.43:9092", "10.17.145.44:9092"],
      "kafkaTopic": "PASC-K8S-MASTER_eventlog"
    }
kind: ConfigMap
metadata:
  name: eventrouter-cm
  namespace: kube-system
---
apiVersion: apps/v1beta2
kind: Deployment
metadata:
  name: eventrouter
  namespace: kube-system
  labels:
    app: eventrouter
spec:
  replicas: 1
  selector:
    matchLabels:
      app: eventrouter
  template:
    metadata:
      labels:
        app: eventrouter
        tier: control-plane-addons
    spec:
      containers:
        - name: kube-eventrouter
          image: harbor.xxx.cn/3rd_part/eventrouter:20190311
          imagePullPolicy: IfNotPresent
          volumeMounts:
          - name: config-volume
            mountPath: /etc/eventrouter
      serviceAccount: eventrouter
      volumes:
        - name: config-volume
          configMap:
            name: eventrouter-cm

k8s安装之eventrouter.yaml的更多相关文章

  1. k8s安装之prometheus.yaml

    这个系列的东东满多的.要另开系列说明. 这里为了内容连续完成,先贴一个吧,其它configmap,exporter就不展示. 为了保持统一,将prometheus也放到二级目录了. - '--web. ...

  2. k8s安装之dashboard.yaml

    这个我使用了nodeport方式导出来. 为了安装,最好在前面加个nginx作密码验证... 这个端口,可以通过防火墙禁掉. # Copyright 2017 The Kubernetes Autho ...

  3. k8s安装之calico.yaml

    这个calico有点长,我也没有仔细看完. 但部署上去是可用的. 如果节点超过200台,那最好要另外一套配置... 而对于我们,差不多下面的配置够用了. veth_mtu: "1440&qu ...

  4. k8s安装之node-autoapprove-certificate-server.yaml

    kubelet证书分为server和client两种, k8s 1.9默认启用了client证书的自动轮换,但server证书自动轮换需要用户开启.方法是: 2.1 增加 kubelet 参数(现已默 ...

  5. k8s安装之kube-state-metrics.yaml

    概述 已经有了cadvisor.heapster.metric-server,几乎容器运行的所有指标都能拿到,但是下面这种情况却无能为力: 我调度了多少个replicas?现在可用的有几个? 多少个P ...

  6. k8s安装之nginx.yaml

    这里两个nginx.一个是用来测试最简单的集群的. 另一个是用来作grafana,prometheus,dashboard前端安全展示的. 简单版 apiVersion: apps/v1 kind: ...

  7. k8s安装之flannel.yaml

    收藏一下,以后直接从这里cp过来用的. flannel新版 --- apiVersion: extensions/v1beta1 kind: PodSecurityPolicy metadata: n ...

  8. k8s安装之grafana.yaml

    这个作展示,够用. 为了使用nginx统一管理, 这里将grafana放在子目录下. - name: GF_SERVER_ROOT_URL  value: "%(protocol)s://% ...

  9. k8s安装部署问题、解决方案汇总

    角色 节点名 节点ip master n1 192.168.14.11 节点1 n2 192.168.14.12 节点2 n3 192.168.14.13 https://raw.githubuser ...

随机推荐

  1. vs2010+ARX2012向导添加mfc支持类出现Error in default.htm PopulateDialogIDs():

    初步判断为ARX2012默认的编译器平台集是v90,如果你只安装了vs2010,没有安装vs2008sp1或者vs2008sp1的编译器,以及对应的Windows MFC SDK,就可能会出现这样的问 ...

  2. springboot集成mybatisplus小例子

    集成mybatisplus后,简单的CRUD就不用写了,如果没有特别的sql,就可以不用mapper的xml文件的. 目录 pom.xml文件 <?xml version="1.0&q ...

  3. 【RSR】RSR如何配置BGP与BFD联动(动态路由)

    应用场景 企业租用运营商MSTP线路,配置BGP路由协议上网,由于企业本端出口路由器无法检测到运营商中间链路通信中断,导致路由收敛缓慢,无法快速的切换到其它备份线路,此时可以在路由器上启用BGP与BF ...

  4. 彩蛋(Python)-------都是细节

    • python所有的符号全部是英文的符号• 数字和bool不支持迭代,列表支持• 列表有序,可变,支持索引• 元组有序,不可变,支持索引• 字典是无序的,可变的数据类型,不支持索引.• 集合,无值的 ...

  5. AttributeError: 'sys.flags' object has no attribute 'utf8_mode'

    AttributeError: 'sys.flags' object has no attribute 'utf8_mode' pycharm工程的py版本是3.6,结果即使使用py3.7编译后的py ...

  6. linux 系统扩容 VMware Centos---VMware ESXi

    用到的命令 df  fdisk  pvcreate   pvdisplay    vgdisplay    vgextend    lvdisplay    lvextend  resize2fs 0 ...

  7. Linux中添加用户与删除用户

    注意:添加用户和删除用户需要root来执行. 添加用户 用useradd命令,例如: # useradd -d/home/tom -s/bin/bash -u1000 tom  这样就添加了新用户to ...

  8. SQL Server 索引优化——无用索引

    我们知道,合理的索引能大幅提升性能,但冗余的索引也会降低数据库性能.随着我们业务的发展,数据库的中的表.表结构.查询的内容都有可能发生变化.这样,有的索引就可能不再使用了,需要删除(因为维护索引即浪费 ...

  9. FreeMarker 教程整理

    Freemarker新手教程 http://blog.csdn.net/qq_23994787/article/details/77506980   FreeMarker教程整理 http://blo ...

  10. SpringICO和DI区别

    学习过Spring框架的人一定都会听过Spring的IoC(控制反转) .DI(依赖注入)这两个概念,对于初学Spring的人来说,总觉得IoC .DI这两个概念是模糊不清的,是很难理解的,今天和大家 ...