Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kubernetes - How is high availability ensured if I deploy a containerised app?

Tags:

kubernetes

I am new to the kubernetes environment. While deploying an application, I could figure out how to do auto scaling but did not quite understand how high availability is ensured? If its not, how can I configure it?

Edit : By HA, I mean how to ensure that pod is scheduled across multiple nodes to ensure HA on pod/service level.

Please guide. Thanks in advance! :)

like image 631
Dreams Avatar asked Nov 08 '22 01:11

Dreams


1 Answers

By HA, I mean how to ensure that pod is scheduled across multiple nodes to ensure HA on pod/service level.

I'm guessing your app is cloud compatible and can be scaled, In this situation there are multiple feature your can take advantage of:

  • DaemonSets: containers on demonsets will be run on every single node. Unless you include/exclude certain nodes.
  • Deployments: Deployments are next generation of Replication Controllers. Using deployments you can easily scale your application as well as ensure availability of certain number of pods. Please note in order to be available on node failure, you need to set node affinity rules on the pods. In order to do that you need to set it in the pod templates. In 1.6 affinity can be specified as a field in PodSpec, rather than using annotations.
like image 107
Farhad Farahi Avatar answered Nov 15 '22 10:11

Farhad Farahi