Thomas Kurian, the incoming head of Google Cloud and formerly president of product development at Oracle, speaks at the Oracle OpenWorld conference in San Francisco on Sept. 24, 2013.

Google's cloud division is cozying up to open-source software companies as it draws a distinction with Amazon, which has started competing with some of those vendors.

"Recently the open-source community has found that cloud providers are not partnering with them, but attempting to take away their ability to monetize open source," Google Cloud CEO Thomas Kurian said at a developer conference on Tuesday. "We as Google do not believe that that is good for customers, for the developer community or for software innovation."

Kurian, who took the helm of Google's cloud division in November, is starting a new initiative to partner with companies like Elastic and MongoDB, which have built businesses by commercializing open-source products.

Last month Elastic stock fell after Amazon Web Services introduced a new community for people to contribute to a separate version of the Elasticsearch open-source software, while MongoDB shares plunged in January, after AWS launched a new and potentially competitive database service.

Shares of Elastic and MongoDB both rallied on Tuesday. By partnering with these companies, Google can provide customers commercial support, consolidated billing and a single management tool for all participating open-source services.