Fabric v2.0 in kubernetes (minikube) - error Peer channel join - TLS issue because of pod's names
We had a similar dot/dash certificate issue with OpenShift and solved it by setting a CommonName with dashes for each Host in our crypto-config file. Maybe this will work for you too.
Something like this:
PeerOrgs: - Name: Org1 Domain: org1-example-com EnableNodeOUs: true Specs: - Hostname: peer0 CommonName: "peer0-org1-example-com" - Hostname: peer1 CommonName: "peer1-org1-example-com" CA: Hostname: ca CommonName: "ca-org1-example-com"
PeerOrgs: - Name: Org2 Domain: org2-example-com EnableNodeOUs: true Specs: - Hostname: peer0 CommonName: "peer0-org2-example-com" - Hostname: peer1 CommonName: "peer1-org2-example-com" CA: Hostname: ca CommonName: "ca-org2-example-com"
OrdererOrgs: - Name: Orderer Domain: example.com EnableNodeOUs: true Specs: - Hostname: orderer CommonName: "orderer-example-com"
UPDATE:We also changed all dot addresses in the configtx.yaml like this:
Orderer: &OrdererDefaults ... EtcdRaft: Consenters: - Host: orderer-example-com ... Addresses: - orderer-example-com:7050
UPDATE 2:probably you have to change the csr part in the fabric-ca-server-config.yaml of each org too:
csr: cn: ca-example-com names: - C: US ST: "New York" L: "New York" O: example-com OU: hosts: - localhost - example-com ca: expiry: 131400h pathlength: 1
csr: cn: ca-org1-example-com names: - C: US ST: "North Carolina" L: "Durham" O: org1-example-com OU: hosts: - localhost - org1-example-com ca: expiry: 131400h pathlength: 1
csr: cn: ca-org2-example-com names: - C: UK ST: "Hampshire" L: "Hursley" O: org2-example-com OU: hosts: - localhost - org2-example-com ca: expiry: 131400h pathlength: 1