How can I deploy a Kubernetes cluster onto OpenStack with Terraform?

HOW TO -️ October 18, 2021

I know OpenStack has a supported method of installing a Container Container Orchestration Engine (COE) like Kubernetes using Magnum. I can not use Magnum because I am not an administrator on OpenStack and we do not have the "Service Endpoint" for Magnum installed.


Terraform has the ability to provision resources on OpenStack: I have this working. Is there any easy way to provision multiple resources and to configure a Kubernetes cluster on top of OpenStack from a non-admin level of permissions? I'm open to using other tools like Ansible to get this job done. I'm just wondering if this is possible as a regular non-admin of OpenStack to easily set up a Kubernetes cluster from the resources I can provision?

Answer

You can try rancher Kubernetes Engine (rke), that helps us to configure the Openstack provider in the Kubernetes cluster for creating resources like persistent volumes, Loadbalancers etc. https://rancher.com/docs/rke/latest/en/config-options/cloud-providers/openstack/ Can you give more info on what kind of permissions are we talking about? I use the Terraform helm_provider to directly deploy applications, controllers, and basically everything. You can also use kubernetes or kubectl manifest(again terraform resource) to accomplish this, but it's a bit messy for my taste. So I basically have an EKS cluster built with Terraform, and I have deployed all the resources and controllers with the helm_provider and I maintain it fully with that. @KristianKanchev I want to answer that question, but I don't know how. So I asked a follow up https://devops.stackexchange.com/q/15407/18965

Initializing...