Build Cloud-Native apps with Apache Cassandra

GOT QUESTIONS from the Workshop? You're in the right place! Post a question here and we'll get you answers.

Click here for Week 8 Materials and Homework.

Follow us on Eventbrite to get notified when new workshops are scheduled!


question

dynamo3209_188769 avatar image
dynamo3209_188769 asked ·

Got "error converting YAML to JSON" when installing Grafana operator in week 5 exercises

Hi,

I am getting below error while trying to install grafana operator in week 5 Homework step 4a.

$ kubectl -n cass-operator create -f ./prometheus_grafana/grafana/operator.yaml
error: error parsing ./prometheus_grafana/grafana/operator.yaml: error converting YAML to JSON: yaml: line 123: mapping values are not allowed in this context

Please help.

Thanks,

Mohit

workshop
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Erick Ramirez avatar image
Erick Ramirez answered ·

The Grafana operator file (prometheus_grafana/grafana/operator.yaml) only has these lines (comments excluded):

apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: grafana-operator
  namespace: cass-operator
spec:
  channel: alpha
  name: grafana-operator
  source: operatorhubio-catalog
  sourceNamespace: olm

so I'm really surprised that you're getting an error for line 123. Is it possible you've got the wrong copy of the file?

1 comment Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

I recopied the operator.yaml file and was able to move ahead

[Responded to follow up question in #7425]


0 Likes 0 · ·
Cedrick Lunven avatar image
Cedrick Lunven answered ·

Hi dynamo3209_188769

The file is correct, no doubt unless you edited manually.

So my suspicious goes to resources and installation time. Is OLM properly started at this point ? How are the resources of your laptop ? (make sure to shutdown your running 3 nodes Cassandra).


Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.