Permissions

Configuring GCE for OpenShift Container Platform requires the following role:

roles/owner

To create service accounts, cloud storage, instances, images, templates, Cloud
DNS entries, and deploy load balancers and health checks. It is helpful to also
have delete permissions to be able to redeploy the environment while testing.

Configuring Masters

You can set the GCE configuration on your OpenShift Container Platform master hosts in two ways:

When triggering a containerized installation, only the directories of
/etc/origin and /var/lib/origin are mounted to the master and node
container. Therefore, master-config.yaml should be in /etc/origin/master
instead of /etc/.

Currently, the nodeNamemust match the instance name in GCE in order
for the cloud provider integration to work properly. The name must also be
RFC1123 compliant.

When triggering a containerized installation, only the directories of
/etc/origin and /var/lib/origin are mounted to the master and node
container. Therefore, node-config.yaml should be in /etc/origin/node
instead of /etc/.

Start or restart the OpenShift Container Platform services all nodes.

# systemctl restart atomic-openshift-node

Configuring Multizone Support in a GCE Deployment

If manually congifuring GCE, multizone support is not configured by default.

The advanced installation configures single-zone support by default.

If you want multizone support:

Edit or create a /etc/origin/cloudprovider/gce.conf file on all of your OpenShift Container Platform hosts, both masters and nodes.

Switching from not using a cloud provider to using a cloud provider produces an
error message. Adding the cloud provider tries to delete the node because the
node switches from using the hostname as the externalID (which would have
been the case when no cloud provider was being used) to using the cloud
provider’s instance-id (which is what the cloud provider specifies). To
resolve this issue: