Openstack Heat and Kubernetes Deployment Integration - kubernetes

I want to create an Openstack cluster with HEAT and deploy kubernetes on it, how to integrate HEAT with Kubernetes, any solutions or suggestions?

I think that the magnum service is what you are looking for, since it allows you to create and manage not only kubernetes clusters but also other container orchestrator engines such as docker swarm or mesos, being fully integrated in OpenStack.
Indeed, in its core, magnum uses heat to deploy and configure the nodes of the cluster, so if you don't want to reinvent the wheel, give it a go: (Install guide).

Related

What's the easiest way to setup Spinnaker in lab?

I am new to Spinnaker. I want to setup Spinnaker in my lab to test some pipeline deployments to K8s. I read through a lot of videos and websites teaching how to setup Spinnaker using Helm, Hal, Operator, etc. The steps and requirements are quite complex and I am struggling which method I should take
For my lab environment, I have 3 VM running in CentOS (bare metal) and built a Kubernetes cluster on them (1 master and 2 slave nodes). And now I want to setup Spinnaker to test microservice deployment on this k8s cluster in an easy and quick way
Some of my doubts
If I chose Spinnaker on Kubernetes cluster, do I need to setup another new k8s cluster? Or I can use the same cluster that already has several microservices running on it?
If I chose Spinnaker on VM, guess I need to spin up a new Ubuntu machine instead of setting in on my existing CentOS machine?
Any suggestion is welcome. Thanks!

How to deploy Storm, Zookeeper, and Supervisor nodes to GCP?

We're trying to set up a Storm cluster with Google Compute Engine but are having a hard time finding resources. Most Tutorials only cover deploying single applications to GCE. We've dockerized the project but don't know how to deploy to GCP. Any Suggestions?
You may try to configure an instance template and create instances with COS image which already have Docker installed.
Here you can have more information about this.
Other option is using Kubernetes Engine (GKE) which has more features that can help you to have more control on your workloads and it also supports autoscaling, auto upgrades and node repairs.

Deploy Kubernetes on OpenStack

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:
Start several nova instances on OpenStack.
Install Kubernetes master on one instance and install Kubernetes node on other instances.
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?
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.
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.
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.

Recommended way to install kubernetes

I was looking into the different ways of installing Kubernetes in https://kubernetes.io/docs/setup/pick-right-solution/ but I'm still not sure which one is the best for me.
I have access to a testbed that can provision CENTOS 7.3 VM's through vagrant. This tesbed is basically a bare-metal environment in which the VM's are started up.
I can configure each host individually so I suppose kubeadm (https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/) would be a good way to go?
Brandon,
While the Kubernetes community supports multiple cluster deployment solutions simultaneously (mainly because there is no single best solution that will satisfy all the needs of everyone), Kubeadm (https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/) - is the right solution that we may suggest for you.
Kubeadm is a community-driven, cross-distribution cluster deployment and LCM tool, that is widely recognized as a standard way to deploy Kubernetes clusters with a wide variety of options.
Also, feel free to check the article (https://medium.com/#lizrice/kubernetes-in-vagrant-with-kubeadm-21979ded6c63) that describes the way of Kubernetes cluster deployment with Kubeadm and Vagrant.

Deploy Kubernetes on Self-host Production environment

I am trying to install kubernetes on Self-hosted production environment running on Ubuntu 16.04. I am not able to find any helpful guide to setup production grade kubernetes master and connect worked nodes to it.
any help is much appreciated.
you can use the kubespray to self Host production environment.
https://github.com/kubernetes-incubator/kubespray
Depends on what you understand by saying "self-host". The most people think it's about deploying kubernetes in the own environment.
If you want to compare different approaches to deploy k8s in a custom environment, refer to this article which covers a bunch of options suitable for that.
If you are interested in how to set up an HA Kubernetes cluster using kubeadm, refer to this article.
However, in kubernetes, there is a different definition of "self-hosted". It means running kubernetes itself as a workload in kubernetes. If you are interested in a real self-hosted approach (on a custom environment), refer to this article
Hope this helps
You can use typhoon which can be used to provision an HA kubernetes cluster.
Here is a sample configuration which I used to bring up my own home cluster.
A few advantages of typhoon are that you have the option of choosing your choice of a cloud provider for provisioning your infrastructure, which is done using terraform and the fact that it gives you upstream k8s is a big plus too.
Internally, it uses bootkube to bring up the temporary control plane, which would consist of
api-server
controller-manager
scheduler
and then when we have the temporary control plane object, we inject the objects to the API server to have our k8s cluster.
Have a look at this kubecon talk given by CoreOS which explains how this is working.