Remove the environment variable CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE: "example" from yaml file. Now again up the blockchain network and Instantiate the chaincode you will be able to instantiate the chaincode.
This environment cause problem when you are spawning the hyperledger fabric on kubernetes. This will not cause any error when you spawning the blockchain network on docker.