How to configure Acitve/Standby high availability for application deployed in Kubernetes - kubernetes

I have to deploy an application in Kubernetes in Active/Standby High availability configurations.
How to do this using Kubernetes concepts?
Thanks

There is no any native support for Active/Standby application deployment in Kubernetes.
Here is the feature request on Github.
https://github.com/kubernetes/kubernetes/issues/45300

front the two application instances using ha-proxy. ha-proxy supports active/standby mode

Related

GKE - Hybrid Kubernetes cluster

I've been reading the Google Cloud documentation about hybrid GKE cluster with Connect or completely on prem with GKE on-prem and VMWare.
However, I see that GKE with Connect you can manage the on-prem Kubernetes cluster from Google Cloud dashboard.
But, what I am trying to find, is, to mantain a hybrid cluster with GKE mixing on-prem and cloud nodes. Graphical example:
For the above solution, the master node is managed by GCloud, but the ideal solution is to manage multiple node masters (High availability) on cloud and nodes on prem. Graphical example:
Is it possible to apply some or both of the proposed solutions on Google Cloud with GKE?
If you want to maintain hybrid clusters, mixing on prem and cloud nodes, you need to use Anthos.
Anthos is a modern application management platform that provides a consistent development and operations experience for cloud and on-premises environments.
The primary computing environment for Anthos uses Anthos clusters, which extend GKE for use on Google Cloud, on-premises, or multicloud to manage Kubernetes installations in the environments where you intend to deploy your applications. These offerings bundle upstream Kubernetes releases and provide management capabilities for creating, scaling, and upgrading conformant Kubernetes clusters. With Kubernetes installed and running, you have access to a common orchestration layer that manages application deployment, configuration, upgrade, and scaling.
If you want to know more about Anthos in GCP please follow this link.

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.

What's the difference between Kubernetes-native and non-native applications?

From the Kubernetes docs:
For Kubernetes-native applications, Kubernetes offers a simple Endpoints API that is updated whenever the set of Pods in a Service changes. For non-native applications, Kubernetes offers a virtual-IP-based bridge to Services which redirects to the backend Pods.
What is the exact difference between Kubernetes-native and non-native applications?
I found the same section and interpret it as :
native are apps that are packed up and run inside k8s as some ‚kind‘. All dockerized apps should be in that category.
non native is connected with the k8s cluster infrastructure but not deployed within. A legacy app, an Oracle cluster or your backup robot may fall in this category.
From my interpretation, non-native applications are Services-without-selectors, for which end-point are not created,(such as application running in different namespace, running outside kubernetes, development databases etc.)

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.

How to bootstrap multiple masters for HA

Kubernetes 1.2:
How do you bootstrap a second master for an HA configuration?
Can you use kube-up?
The HA doc doesn't really get into that:
https://github.com/kubernetes/kubernetes/blob/release-1.2/docs/admin/high-availability.md
Thanks
There aren't any automated scripts (like kube-up.sh) checked into the Kubernetes github repository that will create an HA cluster; you will need to understand the intricacies of building a cluster (many of which are described in the Creating a Custom Cluster from Scratch guide) and build an HA cluster from scratch or modify a "normal" cluster to make it into an HA configuration.
If you are interested in helping contribute to developing better tools for HA masters, you can join the Kubernetes High Availability special interest group.
kops (https://github.com/kubernetes/kops) is able to provision HA Kubernetes with multiple masters: https://github.com/kubernetes/kops/blob/master/docs/commands.md#other-interesting-modes
AFAIK some more upcoming work is being done in k8s 1.5 and 1.6
Some other platforms based on kubernetes supports multiple masters.
For example, Openshift origin support setup cluster with multiple masters and on load balance.
However, Openshift built some customized solutions into kubernetes. Currently k8s couldn't be decoupled from Openshift gracefully.
Personally speaking, I also prefer multiple masters configuration for HA.