Closed willzhang closed 7 months ago
The official docs need to be update:https://docs.victoriametrics.com/operator/quick-start.html#vmservicescrape
For instance, we can create vmservicescrape for VictoriaMetrics operator manually. Let's create file vmservicescrape.yaml:
code vmservicescrape.yaml
with the following content:
apiVersion: operator.victoriametrics.com/v1beta1 kind: VMServiceScrape metadata: name: vmoperator-demo spec: selector: matchLabels: app.kubernetes.io/instance: vmoperator app.kubernetes.io/name: victoria-metrics-operator namespaceSelector: matchNames: - vm
After that you can deploy vmservicescrape resource to the kubernetes cluster:
kubectl apply -f vmservicescrape.yaml -n vm
error logs
root@ubuntu:~/test# kubectl -n vm apply -f vmservicescrape.yaml The VMServiceScrape "vmoperator-demo" is invalid: spec.endpoints: Required value
it need spec.endpoints: https://github.com/VictoriaMetrics/operator/blob/master/config/examples/vmservicescrape.yaml
spec.endpoints
# cat vmservicescrape.yaml apiVersion: operator.victoriametrics.com/v1beta1 kind: VMServiceScrape metadata: name: example-scrape spec: endpoints: - port: http namespaceSelector: {} selector: matchLabels: app.kubernetes.io/name: example-application monitored-by: vm-operator
Thanks for reporting! Should be fixed in https://github.com/VictoriaMetrics/operator/pull/843
The official docs need to be update:https://docs.victoriametrics.com/operator/quick-start.html#vmservicescrape
For instance, we can create vmservicescrape for VictoriaMetrics operator manually. Let's create file vmservicescrape.yaml:
with the following content:
After that you can deploy vmservicescrape resource to the kubernetes cluster:
error logs
it need
spec.endpoints
: https://github.com/VictoriaMetrics/operator/blob/master/config/examples/vmservicescrape.yaml