[Global] auth-url = <OS_AUTH_URL> username = <OS_USeRNAMe> password = <password> tenant-id = <OS_TeNANT_ID> region = <OS_ReGION_NAMe> [LoadBalancer] subnet-id = <UUID of the load balancer subnet>
When deployed on OpenStack, OpenShift can be configured to access OpenStack infrastructure, including using OpenStack Cinder volumes as persistent storage for application data.
To set the required OpenStack variables, create a /etc/cloud.conf file with the following contents on all of your OpenShift hosts, both masters and nodes:
[Global] auth-url = <OS_AUTH_URL> username = <OS_USeRNAMe> password = <password> tenant-id = <OS_TeNANT_ID> region = <OS_ReGION_NAMe> [LoadBalancer] subnet-id = <UUID of the load balancer subnet>
Consult your OpenStack administrators for values of the OS_
variables, which
are commonly used in OpenStack configuration.
edit or
create the
master configuration file on all masters
(/etc/origin/master/master-config.yaml by default) and update the
contents of the apiServerArguments
and controllerArguments
sections:
kubernetesMasterConfig:
...
apiServerArguments:
cloud-provider:
- "openstack"
cloud-config:
- "/etc/cloud.conf"
controllerArguments:
cloud-provider:
- "openstack"
cloud-config:
- "/etc/cloud.conf"
edit or
create
the node configuration file on all nodes (/etc/origin/node/node-config.yaml
by default) and update the contents of the kubeletArguments
and nodeName
sections:
nodeName:
<instance_name> (1)
kubeletArguments:
cloud-provider:
- "openstack"
cloud-config:
- "/etc/cloud.conf"
1 | Name of the OpenStack instance where the node runs (i.e., name of the virtual machine) |