K8s cannot receive trigger message

9 views
Skip to first unread message

Fengwei Tian

unread,
Jan 19, 2022, 7:46:58 PMJan 19
to Knative Users
Hi team,

Recently, I'm setting up Knative environment. However, my broker-trigger setup cannot connect with the k8s service.


Broker:

yaml:
kind: Broker
metadata:
name: products-1
namespace: dev
annotations:

Trigger:
k get Trigger -n dev
NAME                 BROKER       SUBSCRIBER_URI                          AGE     READY   REASON
xxx-trigger     products-1   http://xxx.dev.svc.cluster.local   3h18m

yaml:
kind: Trigger
metadata:
name: xxx-trigger
namespace: dev
annotations:
spec:
broker: products-1
subscriber:
ref:
apiVersion: v1
kind: Service
name: xxx

I tried to use curl and do the simulation:
[ root@curl:/ ]$   curl -v "http://kafka-broker-ingress.knative-eventing.svc.cl
uster.local/dev/products-1" \
>   -X POST \
>   -H "Ce-Id: say-goodbye" \
>   -H "Ce-Specversion: 1.0" \
>   -H "Ce-Type: not-greeting" \
>   -H "Ce-Source: sendoff" \
>   -H "Content-Type: application/json" \
>   -d '{"msg":"Goodbye Knative!"}'
> POST /dev/products-1 HTTP/1.1
> User-Agent: curl/7.35.0
> Host: kafka-broker-ingress.knative-eventing.svc.cluster.local
> Accept: */*
> Ce-Id: say-goodbye
> Ce-Specversion: 1.0
> Ce-Type: not-greeting
> Ce-Source: sendoff
> Content-Type: application/json
> Content-Length: 26

< HTTP/1.1 202 Accepted
< content-length: 0

When I check my k8s service log, I cannot receive anything. Any hints?


Thanks a lot in advance!

Fengwei

Reply all
Reply to author
Forward
0 new messages