We are getting error " error: couldn't read version from server: Get http://22.214.171.124:8080/api: dial tcp 126.96.36.199:8080: i/o timeout" when we are executing below
im sorry, the title suggests Windows server 2016, but it appears you have a ubuntu machines.
Regardless perhaps you could share abit more to you configuration.
are these ASM or ARM based Machines, is you cluster active / passive.
the IP you are using is a public IP, have you created the correct end points ?
Also here is a github project for moodle cluster in azure https://github.com/Azure/azure-quickstart-templates/tree/master/moodle-cluster-ubuntu