Open taddgiles opened 5 years ago
There is no toggle for the monitoring port right now, but you could enable it via the config file:
echo '
http = 0.0.0.0:8222
' > streaming.conf
kubectl create secret generic streaming-conf --from-file=streaming.conf
echo '
---
apiVersion: "streaming.nats.io/v1alpha1"
kind: "NatsStreamingCluster"
metadata:
name: "example-stan"
spec:
size: 3
natsSvc: "example-nats-cluster"
configFile: "/etc/stan/config/streaming.conf"
template:
spec:
containers:
- ports:
- containerPort: 8222
volumes:
- name: streaming-conf
secret:
secretName: streaming-conf
containers:
- name: nats-streaming
volumeMounts:
- mountPath: /etc/stan/config
name: streaming-conf
readOnly: true
' | kubectl apply -f -
kubectl port-forward example-stan-1 8222:8222
curl 127.0.0.1:8222/streaming/serverz
That worked great. Big thanks!
np! Will keep this issue open since a simple toggle on the manifest spec could be useful.
Is there a way to enable http monitoring with the nats-streaming-operator?
/streaming/serverz
and such.I tried adding a container args to the k8s config.
But the default operator config doesn't create a service that would work for that.