0

Tried to install edgexfoundry installation on microk8s, using below command

microk8s.kubectl apply -f k8s-geneva-redis-no-secty.yml

Getting error: error parsing k8s-geneva-redis-no-secty.yml: error converting YAML to JSON: yaml: line 92: mapping values are not allowed in this context

But the same file used on kubernetis using below command kubectl apply -f k8s-geneva-redis-no-secty.yml, it worked and all the pods were running.

Ref URL:- https://github.com/edgexfoundry/edgex-examples/tree/master/deployment/kubernetes

Any help is highly appreciated.

1 Answers1

-1

Its working after formatting the .yml file.

Error code:

  • apiVersion: v1 kind: Service metadata: name: edgex-core-consul spec: type: NodePort selector: app: edgex-core-consul ports: - name: tcp-8500 port: 8500 protocol: TCP targetPort: 8500 nodePort: 30850 - name: tcp-8400 port: 8400 protocol: TCP targetPort: 8400 nodePort: 30840

Updated code:

  • apiVersion: v1 kind: Service metadata: name: edgex-core-consul spec: type: NodePort selector: app: edgex-core-consul ports: - name: tcp-8500 port: 8500 protocol: TCP targetPort: 8500 nodePort: 30850 - name: tcp-8400 port: 8400 protocol: TCP targetPort: 8400 nodePort: 30840
  • None of your above examples are displayed correctly in your answer since you did not use code blocks. Moreover, looking at your source, none of them is correctly formatted anyway to be a correct yaml file. Formatting yaml correctly is not an option just to beautify it: indentation is part of the yaml syntax. For a quick start, you can [learn yaml in y minutes](https://learnxinyminutes.com/docs/yaml/) – Zeitounator Mar 07 '21 at 13:23