首页 > 其他分享 >部署基于 mt-channel-broker 的 broker

部署基于 mt-channel-broker 的 broker

时间:2023-11-16 14:33:05浏览次数:25  
标签:created eventing broker mt knative io channel

安装 in-memory-channel

下载 in-memory-channel

# wget https://github.com/knative/eventing/releases/download/knative-v1.12.0/in-memory-channel.yaml

替换 gcr.io 

# sed -i '[email protected]@gcr.dockerproxy.com@g' in-memory-channel.yaml

创建 in-memory-channel 资源

# kubectl apply -f in-memory-channel.yaml
serviceaccount/imc-controller created
clusterrolebinding.rbac.authorization.k8s.io/imc-controller created
rolebinding.rbac.authorization.k8s.io/imc-controller created
clusterrolebinding.rbac.authorization.k8s.io/imc-controller-resolver created
serviceaccount/imc-dispatcher created
clusterrolebinding.rbac.authorization.k8s.io/imc-dispatcher created
rolebinding.rbac.authorization.k8s.io/imc-dispatcher-tls-role-binding created
role.rbac.authorization.k8s.io/imc-dispatcher-tls-role created
configmap/config-imc-event-dispatcher created
configmap/config-observability created
configmap/config-tracing created
deployment.apps/imc-controller created
service/inmemorychannel-webhook created
service/imc-dispatcher created
deployment.apps/imc-dispatcher created
customresourcedefinition.apiextensions.k8s.io/inmemorychannels.messaging.knative.dev created
clusterrole.rbac.authorization.k8s.io/imc-addressable-resolver created
clusterrole.rbac.authorization.k8s.io/imc-channelable-manipulator created
clusterrole.rbac.authorization.k8s.io/imc-controller created
clusterrole.rbac.authorization.k8s.io/imc-dispatcher created
role.rbac.authorization.k8s.io/knative-inmemorychannel-webhook created
mutatingwebhookconfiguration.admissionregistration.k8s.io/inmemorychannel.eventing.knative.dev created
validatingwebhookconfiguration.admissionregistration.k8s.io/validation.inmemorychannel.eventing.knative.dev created
secret/inmemorychannel-webhook-certs created

查看 in-memory-channel 资源

# kubectl get pods -n knative-eventing
NAME                                     READY   STATUS    RESTARTS        AGE
eventing-controller-75d79c8bfb-fpv26     1/1     Running   2 (4h20m ago)   43h
eventing-webhook-79bf558944-4j6rn        1/1     Running   2 (4h20m ago)   43h
imc-controller-8d958bbf5-xvhm7           1/1     Running   0               95s
imc-dispatcher-799f9f548-fdd99           1/1     Running   0               95s

安装 mt-channel-broker

下载 mt-channel-broker

# wget https://github.com/knative/eventing/releases/download/knative-v1.12.0/mt-channel-broker.yaml

替换 gcr.io 

# sed -i '[email protected]@gcr.dockerproxy.com@g' mt-channel-broker.yaml

创建 mt-channel-broker

# kubectl apply -f mt-channel-broker.yaml
clusterrole.rbac.authorization.k8s.io/knative-eventing-mt-channel-broker-controller created
clusterrole.rbac.authorization.k8s.io/knative-eventing-mt-broker-filter created
role.rbac.authorization.k8s.io/mt-broker-filter created
serviceaccount/mt-broker-filter created
clusterrole.rbac.authorization.k8s.io/knative-eventing-mt-broker-ingress created
role.rbac.authorization.k8s.io/mt-broker-ingress created
serviceaccount/mt-broker-ingress created
clusterrolebinding.rbac.authorization.k8s.io/eventing-mt-channel-broker-controller created
clusterrolebinding.rbac.authorization.k8s.io/knative-eventing-mt-broker-filter created
rolebinding.rbac.authorization.k8s.io/mt-broker-filter created
clusterrolebinding.rbac.authorization.k8s.io/knative-eventing-mt-broker-ingress created
rolebinding.rbac.authorization.k8s.io/mt-broker-ingress created
deployment.apps/mt-broker-filter created
service/broker-filter created
deployment.apps/mt-broker-ingress created
service/broker-ingress created
deployment.apps/mt-broker-controller created
horizontalpodautoscaler.autoscaling/broker-ingress-hpa created
horizontalpodautoscaler.autoscaling/broker-filter-hpa created

查看 mt-channel-broker 资源

# kubectl get pods -n knative-eventing
NAME                                     READY   STATUS    RESTARTS        AGE
eventing-controller-75d79c8bfb-fpv26     1/1     Running   2 (4h23m ago)   43h
eventing-webhook-79bf558944-4j6rn        1/1     Running   2 (4h22m ago)   43h
imc-controller-8d958bbf5-xvhm7           1/1     Running   0               4m2s
imc-dispatcher-799f9f548-fdd99           1/1     Running   0               4m2s
mt-broker-controller-7b98899b48-m45w6    1/1     Running   0               12s
mt-broker-filter-788b867775-gwqn2        1/1     Running   0               13s
mt-broker-ingress-5f5b69fb49-7d6wn       1/1     Running   0               13s

创建 broker

broker-default.yaml

apiVersion: eventing.knative.dev/v1
kind: Broker
metadata:
  name: default
  namespace: event-demo

创建 broker 资源

# kubectl apply -f broker-default.yaml 
broker.eventing.knative.dev/default created

查看 broker 资源

# kubectl get broker -n event-demo
NAME      URL                                                                       AGE   READY   REASON
default   http://broker-ingress.knative-eventing.svc.wgs.local/event-demo/default   46s   True  

查看 broker 信息

# kubectl describe broker -n event-demo
Name:         default
Namespace:    event-demo
Labels:       <none>
Annotations:  eventing.knative.dev/broker.class: MTChannelBasedBroker
              eventing.knative.dev/creator: kubernetes-admin
              eventing.knative.dev/lastModifier: kubernetes-admin
API Version:  eventing.knative.dev/v1
Kind:         Broker
Metadata:
  Creation Timestamp:  2023-11-16T06:26:05Z
  Generation:          1
  Resource Version:    776926
  UID:                 482d0e5b-acb4-4e10-9c99-b3cc299d87f4
Spec:
  Config:
    API Version:  v1
    Kind:         ConfigMap
    Name:         config-br-default-channel
    Namespace:    knative-eventing
  Delivery:
    Backoff Delay:   PT0.2S
    Backoff Policy:  exponential
    Retry:           10
Status:
  Address:
    Name:  http
    URL:   http://broker-ingress.knative-eventing.svc.wgs.local/event-demo/default
  Annotations:
    knative.dev/channelAPIVersion:  messaging.knative.dev/v1
    knative.dev/channelAddress:     http://default-kne-trigger-kn-channel.event-demo.svc.wgs.local
    knative.dev/channelKind:        InMemoryChannel
    knative.dev/channelName:        default-kne-trigger
  Conditions:
    Last Transition Time:  2023-11-16T06:26:05Z
    Status:                True
    Type:                  Addressable
    Last Transition Time:  2023-11-16T06:26:05Z
    Message:               No dead letter sink is configured.
    Reason:                DeadLetterSinkNotConfigured
    Severity:              Info
    Status:                True
    Type:                  DeadLetterSinkResolved
    Last Transition Time:  2023-11-16T06:26:05Z
    Status:                True
    Type:                  FilterReady
    Last Transition Time:  2023-11-16T06:26:05Z
    Status:                True
    Type:                  IngressReady
    Last Transition Time:  2023-11-16T06:26:05Z
    Status:                True
    Type:                  Ready
    Last Transition Time:  2023-11-16T06:26:05Z
    Status:                True
    Type:                  TriggerChannelReady
  Observed Generation:     1
Events:                    <none>

参考文档

https://knative.dev/docs/eventing/brokers/broker-types/channel-based-broker/

标签:created,eventing,broker,mt,knative,io,channel
From: https://www.cnblogs.com/wangguishe/p/17836159.html

相关文章

  • NS-3源码学习(二)Channel和NetDevice
    NS-3源码学习(二)Channel和NetDevice对于一个新的802.11协议的实现,仅需要完成对两个抽象类的实现即可,一个是Channel抽象类,一个是NetDevice接口,这两个类对上层来说是透明的,而且据我查阅代码了解,这两个类仅需知道上一层(网络层)是IPv4协议还是IPv6协议即可,并没有对上层有更高的要求。M......
  • AR智能眼镜_联发科Genio 700(MT8390)AR眼镜定制开发
    AR眼镜是一种前景广阔的技术,无论是在显示效果、体积还是功能方面都有了显著的提升。AR技术因其向智能、实时、三维、多重交互和开放世界的转变而备受关注。AR眼镜集成了AR技术、语音识别、智能控制等多项高科技功能,可以帮助用户实现更加便捷、高效、个性化的工作和生活体验......
  • Genio 700/MT8390安卓核心板规格参数_MTK核心板定制
    联发科Genio700(MT8390)是一款针对智能家居、互动零售、工业和商业应用的高性能边缘人工智能物联网平台。它具有高度响应的边缘处理、先进的多媒体功能、多种传感器和连接选项,并支持多任务操作系统。4TOPSAPU性能:该高效的芯片内人工智能多处理器(APU)提供4TOPS的性能,......
  • SMT贴片生产加工的质量控制方法
    SMT贴片生产加工是一种现代电子技术的封装方式,它通过将电子元器件直接贴片到印刷电路板上,取代了传统的插针式封装方式,具有体积小、重量轻、可靠性高的优点。为了确保SMT贴片生产加工的质量,需要使用一系列的质量控制方法。本文将介绍几种常用的SMT贴片生产加工质量控制方法。1、原材......
  • Android 11 (MTK)状态栏图标反色-->跟随当前应用变化代码流程
    //StatusBar.javapublicvoidstart(){.............onSystemBarAppearanceChanged(mDisplayId,result.mAppearance,result.mAppearanceRegions,result.mNavbarColorManagedByIme);mAppFullscreen=result.mAppFullscreen;......
  • Golang 无缓冲channel有哪些特点?
    无缓冲channel是Go语言中的一种特殊类型的channel,其主要特点是在发送和接收数据时要求发送方和接收方必须同时准备好,否则会造成阻塞。具体来说,当一个无缓冲channel的发送操作没有准备好时,会阻塞发送方的执行;同样地,当一个无缓冲channel的接收操作没有准备好时,会阻塞接收方的执行。无......
  • 随笔-Centos7 install systemtap
    SystemTapBeginnersGuideChapter2.UsingSystemTapThischapterinstructsusershowtoinstallSystemTap,andprovidesanintroductiononhowtorunSystemTapscripts.2.1.InstallationandSetupTodeploySystemTap,SystemTappackagesalongwiththeco......
  • MT8788/MTK8788安卓核心板介绍_4G全网通安卓智能模块
    MT8788核心板是一款功能强大的4G全网通安卓智能模块。它采用联发科AIOT芯片平台,具有超高性能和低功耗的特点。该核心板搭载了12nm制程四个Cortex-A73+四个Coretex-A53处理器,最高主频可达2.0GHZ。内存方面,板载内存为4GB+64GB,同时也支持2GB+16GB和3GB+32GB的配置。图形方面,MT8788......
  • localtime_r与gmtime_r
    简单说gmtime_r转换与时区没关系,为UTC时间;localtime_r与时区相关,为本地时间。好记性不如烂笔头,记录一下。 参考:https://www.python100.com/html/115143.htmllocaltime_r函数的实现原理是基于时区的概念,它通过读取系统的时区文件来进行时区的转换。时区文件存放在目录"/usr/......
  • Go中字符串处理:fmt.Sprintf与string.Builder的比较
    在Go语言中,我们通常会遇到两种主要的方式来处理和操作字符串:使用fmt.Sprintf函数和string.Builder类型。尽管两者都可以实现字符串的格式化和连接,但它们在性能和用法上有一些关键区别。1.fmt.Sprintffmt.Sprintf是一个函数,它根据提供的格式化字符串和参数列表,将它们格式化为一......