We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I was successful connect it with kubectl port-forward svc/example-nats 4222:4222, but how to expose it with nginx-ingress?
kubectl port-forward svc/example-nats 4222:4222
apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: kubernetes-ingress annotations: kubernetes.io/ingress.class: nginx spec: rules: - host: client.test-stan.xyz http: paths: - backend: serviceName: example-nats servicePort: 4222
Code:
import nats from "node-nats-streaming"; const stan = nats.connect("example-stan", "abc", { // url: "http://localhost:4222", // successful connected url: "nats://client.test-stan.xyz:4222", // failed }); stan.on("connect", () => { console.log("Publisher connected to NATS"); const data = 'hello world!'; stan.publish("nats:created", data, () => { console.log("Event published"); }); });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I was successful connect it with
kubectl port-forward svc/example-nats 4222:4222
, but how to expose it with nginx-ingress?Code:
The text was updated successfully, but these errors were encountered: