Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Private ethereum blockchain deployment on kubernetes

apiVersion: v1
kind: ConfigMap
metadata:
  name: eth-geth
  namespace: the-project
  labels:
    app: eth-geth
data:
  networkid: "818945"
  genesis.json: |- { "config": { "chainId": 818945, "homesteadBlock": 0, "eip150Block": 0, "eip155Block": 0, "eip158Block": 0 }, "difficulty": "0x400", "gasLimit": "2000000", "nonce" : "0x0000000000000000", "alloc": { "0x58917D55dA991da576F148FD7E3E05a34666988b": { "balance": "100000000000000000000" }, "0x29bb385cF8ae4Cc49dBd10CcdA5e3d591D831527": { "balance": "200000000000000000000" }, "0xf1c9C9a1Ba591588147c2A729c470D8AFA91a04d": { "balance": "300000000000000000000" } } }

the above code throws the following error while kubectl apply.
error converting yaml to JSON yaml: line 10:did not find expected comment or line break

Checked the indentation but i am missing something here.Tried different versions of line10 , doesn’t seem to work.Can someone suggest with a solution?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Try this

apiVersion: v1
kind: ConfigMap
metadata:
  name: eth-geth
  namespace: the-project
  labels:
    app: eth-geth
data:
  networkid: "818945"
  genesis.json: | 
    { "config": { "chainId": 818945, "homesteadBlock": 0, "eip150Block": 0, "eip155Block": 0, "eip158Block": 0 }, "difficulty": "0x400", "gasLimit": "2000000", "nonce" : "0x0000000000000000", "alloc": { "0x58917D55dA991da576F148FD7E3E05a34666988b": { "balance": "100000000000000000000" }, "0x29bb385cF8ae4Cc49dBd10CcdA5e3d591D831527": { "balance": "200000000000000000000" }, "0xf1c9C9a1Ba591588147c2A729c470D8AFA91a04d": { "balance": "300000000000000000000" } } }
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading