thank you @sameer for your answer, I think I am not understanding you correctly.
After visiting the link you give me, I have launched:
kubectl apply --filename https://github.com/knative-sandbox/eventing-rabbitmq/releases/latest/download/rabbitmq-source.yaml
To install the rabbitmq source and generated the secret:
kubectl create secret generic rabbitmqc-default-user -n knative-eventing --from-literal=user=root --from-file=password=/tmp/password
And the following resource:
apiVersion: sources.knative.dev/v1alpha1
kind: RabbitmqSource
metadata:
name: rabbitmq-source
namespace: knative-eventing
spec:
broker: "host.external.dns:5671/"
connectionSecret:
name: "rabbitmqc-default-user"
user:
secretKeyRef:
name: "rabbitmqc-default-user"
key: "username"
password:
secretKeyRef:
name: "rabbitmqc-default-user"
key: "password"
exchangeConfig:
name: "logs"
type: "fanout"
durable: true
autoDelete: false
queueConfig:
name: "test"
routingKey: ""
durable: false
autoDelete: false
channelConfig:
parallelism: 10
sink:
ref:
apiVersion: v1
kind: Service
name: recorder
But after generating the resources I get these errors:
knative-sources/rabbitmq-controller-manager
│ W0524 11:45:04.108665 1 reflector.go:324] k8s.io/client-go@v0.23.5/tools/cache/reflector.go:167: failed to list *v1beta1.Binding: the server could not find the requested resource (get bindings.rabbitmq.com) │
│ E0524 11:45:04.108718 1 reflector.go:138] k8s.io/client-go@v0.23.5/tools/cache/reflector.go:167: Failed to watch *v1beta1.Binding: failed to list *v1beta1.Binding: the server could not find the requested resource (get bindings.rabbitmq.com) │
│ W0524 11:45:04.109915 1 reflector.go:324] k8s.io/client-go@v0.23.5/tools/cache/reflector.go:167: failed to list *v1beta1.Queue: the server could not find the requested resource (get queues.rabbitmq.com) │
│ E0524 11:45:04.109935 1 reflector.go:138] k8s.io/client-go@v0.23.5/tools/cache/reflector.go:167: Failed to watch *v1beta1.Queue: failed to list *v1beta1.Queue: the server could not find the requested resource (get queues.rabbitmq.com) │
│ W0524 11:45:04.109976 1 reflector.go:324] k8s.io/client-go@v0.23.5/tools/cache/reflector.go:167: failed to list *v1beta1.Exchange: the server could not find the requested resource (get exchanges.rabbitmq.com) │
│ E0524 11:45:04.109985 1 reflector.go:138] k8s.io/client-go@v0.23.5/tools/cache/reflector.go:167: Failed to watch *v1beta1.Exchange: failed to list *v1beta1.Exchange: the server could not find the requested resource (get exchanges.rabbitmq.com) │
│ W0524 11:45:05.253806 1 reflector.go:324] k8s.io/client-go@v0.23.5/tools/cache/reflector.go:167: failed to list *v1beta1.Exchange: the server could not find the requested resource (get exchanges.rabbitmq.com) │
│ E0524 11:45:05.254035 1 reflector.go:138] k8s.io/client-go@v0.23.5/tools/cache/reflector.go:167: Failed to watch *v1beta1.Exchange: failed to list *v1beta1.Exchange: the server could not find the requested resource (get exchanges.rabbitmq.com) │
│ W0524 11:45:05.443628 1 reflector.go:324] k8s.io/client-go@v0.23.5/tools/cache/reflector.go:167: failed to list *v1beta1.Queue: the server could not find the requested resource (get queues.rabbitmq.com)
The truth is that I have searched and searched and I have not found information on how to connect it to an external RabbitMQ to Kubernetes, maybe I am not understanding the documentation well.