This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 19. Configuring for GCE
19.1. Overview 링크 복사링크가 클립보드에 복사되었습니다!
OpenShift Container Platform can be configured to access a Google Compute Engine (GCE) infrastructure, including using GCE volumes as persistent storage for application data. After GCE is configured properly, some additional configurations will need to be completed on the OpenShift Container Platform hosts.
19.2. Configuring Masters 링크 복사링크가 클립보드에 복사되었습니다!
You can set the GCE configuration on your OpenShift Container Platform master hosts in two ways:
19.2.1. Configuring OpenShift Container Platform Masters for GCE with Ansible 링크 복사링크가 클립보드에 복사되었습니다!
During advanced installations, GCE can be configured using the openshift_cloudprovider_kind
parameter, which is configurable in the inventory file.
Example GCE Configuration with Ansible
Cloud Provider Configuration
# Cloud Provider Configuration
#
openshift_cloudprovider_kind=gce
When Ansible configures GCE, the following files are created for you:
- /etc/origin/cloudprovider/gce.conf
- /etc/origin/master/master-config.yaml
- /etc/origin/node/node-config.yaml
The advanced installation configures multizone support by default. If you want single-zone support, edit the /etc/origin/cloudprovider/gce.conf as shown in Configuring Multizone Support in a GCE Deployment.
19.2.2. Manually Configuring OpenShift Container Platform Masters for GCE 링크 복사링크가 클립보드에 복사되었습니다!
To configure the OpenShift Container Platform masters for GCE:
Edit or create the master configuration file (/etc/origin/master/master-config.yaml by default) on all masters and update the contents of the
apiServerArguments
andcontrollerArguments
sections:Copy to Clipboard Copied! Toggle word wrap Toggle overflow ImportantWhen 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/.
Start or restart the OpenShift Container Platform services:
systemctl restart atomic-openshift-master
# systemctl restart atomic-openshift-master
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
19.3. Configuring Nodes 링크 복사링크가 클립보드에 복사되었습니다!
To configure the OpenShift Container Platform nodes for GCE:
Edit or create the node configuration file (/etc/origin/node/node-config.yaml by default) on all nodes and update the contents of the
kubeletArguments
section:kubeletArguments: cloud-provider: - "gce" cloud-config: - "/etc/origin/cloudprovider/gce.conf"
kubeletArguments: cloud-provider: - "gce" cloud-config: - "/etc/origin/cloudprovider/gce.conf"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ImportantWhen 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
# systemctl restart atomic-openshift-node
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
19.4. Configuring Multizone Support in a GCE Deployment 링크 복사링크가 클립보드에 복사되었습니다!
If manually congifuring GCE, multizone support is not configured by default.
The advanced installation configures multizone 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.
Add the following contents:
[Global] multizone = true
[Global] multizone = true
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Start or restart the OpenShift Container Platform services on the master and all nodes.
systemctl restart atomic-openshift-master systemctl restart atomic-openshift-node
# systemctl restart atomic-openshift-master # systemctl restart atomic-openshift-node
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
To return to single-zone support, set the multizone
value to false
.