Follow the steps mentioned below:
Create connection profile
~/.composer-connection-profiles/bmx-stage1-kubes/connection.json
{
"name": "bmx-stage1-kubes-org1",
"description": "Connection profile for IBM Blockchain Platform",
"type": "hlfv1",
"orderers": [
{
"url": "grpc://169.47.123.123:31010"
}
],
"ca": {
"url": "http://169.47.123.123:30000",
"name": "CA1"
},
"peers": [
{
"requestURL": "grpc://169.47.123.123:30110",
"eventURL": "grpc://169.47.123.123:30111"
}
],
"keyValStore": "/Users/jeff/.composer-credentials/bmx-stage1-kubes-
org1",
"channel": "channel1",
"mspID": "Org1MSP",
"timeout": 300
}
Make sure the public address matches the public address of your kubernetes cluster.
After setting up my kubernetes env, you should get the appropriate admin creds that you can use to create an admin id (PeerAdmin)
In order to grab the creds, you first need to access one of the pods in my kubernetes cluster
kubectl exec -ti $(kubectl get pods | grep ca| awk '{print $1}') bash
Then you have to get the cert file and the key file for the ca. You will find the cert file here:
/shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/admincerts
you will find the key file here:
/shared/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore
Then copy the contents of those files into a cert file (admincert.pem) and a private key file (key.pem) on your local system and then run:
composer identity import -p bmx-stage1-kubes-org1 -u PeerAdmin -c admincert.pem -k key.pem
This will create your PeerAdmin (admin identity)
then run
composer network deploy -a myBNA.bna -p bmx-stage1-kubes-org1 -i PeerAdmin -s abc