Deploy Kubernetes on OpenStack

9/16/2018

I am trying to understand the relationship between Kubernetes and OpenStack. I am confused around the topic of deploying Kubernetes on OpenStack and doing my research I found there are too many tutorials. My understanding of the sequence is:

  1. Start several nova instances on OpenStack.
  2. Install Kubernetes master on one instance and install Kubernetes node on other instances.
  3. Submit YAML file using kubectl and Kubernetes will create and deploy my application.

As for Kubernetes's self-healing capacity, can Kubernetes restart some of the failed nova instances? Which component in Kubernetes is responsible for restart/reboot/delete/re-provision nova instances? Is it Kubernetes master? If so, what will happen if the Kubernetes master is down and cannot be recovered?

-- BAE
kubernetes
openstack
openstack-nova

3 Answers

9/16/2018

1, 2 and 3 are correct.

Self-healing

You can deploy in master HA configuration. The recommended way is either 3 or 5 master with a quorum of (n + 1)/ 2

Can Kubernetes reprovision/restart some the failed nova instances?

Not really. That's after nova to manage all the server services. Kubernetes has an OpenStack module that allows it to interact with OpenStack components like create external load balancer and creates volumes that can be used with your workloads/pods/containers.

You can either use kubeadm or kubespray to bootstrap a cluster.

Hope it helps.

-- Rico
Source: StackOverflow

9/16/2018

Yes, you're spot on with your observations in the case of running Kubernetes on top of OpenStack and the other answers here give you further pointers already. I just wanted to point out, in addition, that the other way round is also an option, that is, running OpenStack on top of Kubernetes, for example using OpenStack-Helm.

-- Michael Hausenblas
Source: StackOverflow

9/16/2018

If you want to deploy Kubernetes on top of Openstack I would recommend that you look into Openstack Magnum. This is the most common use case for Openstack and Kubernates.

There is also the possibility of running the Openstack Control Plane under Kubernetes, which would allow you to better scale and auto-heal Openstack services. This is primarily for the Control Plane (e.g. nova-api), and as far as I know there is no way of running nova-computes under Kubernetes.

I found a good blog post here that describes some of the benefits from such an approach.

-- eandersson
Source: StackOverflow