Creating HLF network with fabric-go-sdk and kubernetes #kubernetes #fabric-sdk-go #testnetwork



I have a problem with understanding the role of GO SDK in HLF and with Kubernetes. Here is the story.

First, I have managed to setup three test networks provided by fabric samples. My next step was trying to add an organization to test-network-k8s, and TBH it was quite complex to add and reconfigure data via bash/config files to manage such an action. Then, I found out that the way to do it is via GO SDK by creating an operator. So, I tried a few k8s operators, but I cannot say they enhanced my understanding. 

1) When building initial HLF infrastructure, do you build it programmatically with SDK? If no, which are the base components I need to setup (binaries, configs, other software)? 
2) How to connect HLF with the SDK? If I create go project and add SDK, how will the SDK recognize the HLF network, which configuration do I need to setup?

Any help would be appreciated


Bruno Andreghetti


I have been studying the Go SDK for the past few weeks to use it for administrative tasks, since the Node SDK does not support them anymore. Now to answer your questions:

1) You can do it both ways, the CLI and the SDK are both interoperable. I believe the only thing that is CLI-only is the creation of genesis blocks using configtxgen, which AFAIK is not supported by any SDK.

2) For the SDK you need a config file like this one. Check the E2E integration test for examples on how to perform administrative tasks with the SDK.


Bruno Andreghetti @ GoLedger

Nikos Karamolegkos

Let me extend Matija's questions. Can the administrative tasks take place on the fly without affecting the network operations. For example can I add new channel (i.e channel2) and and add to this channel the existing orgs (i.e peers) without affecting  the operations in already existed channel1. Same for deploying chaincode and register users to an org.

Thank you