Running Kubernetes on OpenStack is surprisingly lacking simple HOWTOs. So I just cook one.
First, spin up a Nova instance on OpenStack and make sure docker, golang, etcd, openssl are installed.
Then following the instruction from OpenStack to get the RC file:
“Download and source the OpenStack RC file¶
Log in to the dashboard and from the drop-down list select the project for which you want to download the OpenStack RC file.
On the Project tab, open the Compute tab and click Access & Security.
On the API Access tab, click Download OpenStack RC File and save the file. The filename will be of the form PROJECT-openrc.sh where PROJECT is the name of the project for which you downloaded the file.
Copy the PROJECT-openrc.sh file to the computer from which you want to run OpenStack commands. “
Use the OpenStack RC and create your OpenStack cloud config for Kubernetes using the following format
# cat /etc/cloud.conf [Global] auth-url = username = password = tenant-name = region =
The clone the Kubernetes source tree and apply my patch from PR 25750 (if not merged yet)
Then you can spin up a local cluster under Kubernetes source tree using the following command:
# find Nova instance name and override hostname ALLOW_PRIVILIGED=true CLOUD_PROVIDER=openstack CLOUD_CONFIG=/etc/cloud.conf HOSTNAME_OVERRIDE="rootfs-dev" hack/local-up-cluster.sh