gcloud composer: The network “network-name" does not have available private IP space in x.0.0.0/x to reserve a /x block for containers for cluster

10/16/2018

I am trying to evaluate Airflow on gCloud using gcloud composer. When I try to create an environment from console by providing all the required details, it fails with the error: The network “network-name" does not have available private IP space in 10.0.0.0/8 to reserve a /14 block for containers for cluster. I am not able to get past this error to create the environment.

I know from previous experience that GKE that this error could be solved by passing the desired address space using the option: --cluster-ipv4-cidr. The 'gcloud composer environments create' command does not accept the ' --cluster-ipv4-cidr' option. It is only accepted in the context of 'gcloud container clusters create'. Is there a way to explicitly mention the desired CIDR in 'gcloud composer' command? Please advise.

-- wanderluster
cidr
composer-php
gcloud
google-kubernetes-engine

1 Answer

10/17/2018

Unfortunately there is currently no way to pass that flag on through composer during environment creation. Without this flag, the cluster is created using the default value which uses the CIDR range of 10.0.0.0/8. This being said, you can also configure a secondary range for your subnet which can handle a /14 range within 10.0.0.0/8.

-- Patrick W
Source: StackOverflow