Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose barco service to be consumed externally #19

Open
rmarting opened this issue Sep 19, 2022 · 1 comment
Open

Expose barco service to be consumed externally #19

rmarting opened this issue Sep 19, 2022 · 1 comment

Comments

@rmarting
Copy link

The current k8s definition of the barco service has not included nodePorts, so it is impossible to execute the sample commands to test and verify the production of messages.

Steps to reproduce

  1. Start minikube
  2. Deploy Barco following the instructions
  3. Execute the command to publish a message:
❯ TOPIC="my-topic"
curl -X POST -i -d '{"hello":"world"}' \
    -H "Content-Type: application/json" --http2-prior-knowledge \
    "http://barco.streams:9251/v1/topic/${TOPIC}/messages"
curl: (6) Could not resolve host: barco.streams
  1. Expose service to be consumed externally:
❯ minikube service barco --url -n streams
😿  service streams/barco has no node port

Suggestions

I would like to suggest improving the Getting Started by adding some references to have a local Kubernetes cluster (or using the local development environment) before to try to execute the commands to produce or consume. Otherwise, it is a bit complicated to follow up on the instructions.

Meanwhile the barco service is not available to expose it, there is an alternative way to execute the commands using the exec option of kubectl CLI:

❯ k exec barco-0 -- curl -X POST -i -d '{"hello":"world"}' -H "Content-Type: application/json" --http2-prior-knowledge "http://barco:9251/v1/topic/my-topic/messages"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    19  100     2  100    17      1     16  0:00:02  0:00:01  0:00:01    18
HTTP/2 200 
content-type: text/html; charset=utf-8
content-length: 2
date: Mon, 19 Sep 2022 07:12:15 GMT

OK
@jorgebay
Copy link
Contributor

Thanks @rmarting !

💯 Getting started should account for the different types of local installations and guide them to the proper hostname / port.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants