1
00:00:04,200 --> 00:00:07,050
Hello and welcome to this lecture. In this lecture

2
00:00:07,050 --> 00:00:13,810
we will discuss about designing a kubernetes cluster. Before you head into designing a cluster.

3
00:00:13,820 --> 00:00:16,490
I must ask the following questions.

4
00:00:16,490 --> 00:00:18,740
What is the purpose of this cluster?

5
00:00:18,770 --> 00:00:25,100
Is it for learning or development or testing purpose or for hosting production grade applications.

6
00:00:25,100 --> 00:00:27,740
What is the cloud adoption at your organization?

7
00:00:27,740 --> 00:00:33,650
Do you prefer your platform to be managed by a cloud provider or a self hosted?

8
00:00:33,650 --> 00:00:37,100
What kind of workloads are you going to run on this cluster?

9
00:00:37,100 --> 00:00:40,400
How many applications are to be hosted on the Cluster?

10
00:00:40,490 --> 00:00:42,050
Few or many?

11
00:00:42,050 --> 00:00:48,590
What kind of applications are going to be hosted on the Cluster?  Web applications or big data or analytics?

12
00:00:49,310 --> 00:00:53,880
Depending on the kind of application the resource requirements may vary.

13
00:00:53,900 --> 00:00:57,500
What type of network traffic are these applications expecting?

14
00:00:57,500 --> 00:01:00,900
Continuous heavy traffic or burst?

15
00:01:00,910 --> 00:01:03,510
Well let's try and break down some of these.

16
00:01:03,890 --> 00:01:09,320
If you want to deploy a cluster for learning purposes then a solution based on minikube or a single

17
00:01:09,320 --> 00:01:17,120
node cluster deployed using kubeadm on local VMs or cloud providers like GCP or AWS should do.

18
00:01:17,120 --> 00:01:22,550
We have deployed such a cluster in the beginners course. To deploy a cluster for development and testing

19
00:01:22,550 --> 00:01:28,310
purposes, and multi node cluster with single master and multiple worker nodes would help.

20
00:01:28,310 --> 00:01:34,580
Again kubeadm is an appropriate tool. Or if on managed cloud environments, then quickly provision a

21
00:01:34,580 --> 00:01:44,630
cluster on GCP, AWS or AKS on Azure. Let’s talk about

22
00:01:44,660 --> 00:01:49,020
production level clusters. For hosting production grade applications.

23
00:01:49,070 --> 00:01:54,540
a High Availability Multi node cluster with multiple master nodes is recommended.

24
00:01:54,860 --> 00:02:01,370
We look at more details about High Availability setup with multiple-master nodes later in this section.

25
00:02:01,370 --> 00:02:08,570
Again this can be setup with kubeadm or GCP  or using kops on AWS or other supported platforms.

26
00:02:08,810 --> 00:02:15,270
You can have upto 5000 nodes in the cluster, a total of 150k PODs in the cluster,

27
00:02:15,300 --> 00:02:21,770
300,000 containers in total and upto 100 PODs per node. Depending on the size of your

28
00:02:21,770 --> 00:02:22,430
cluster.

29
00:02:22,430 --> 00:02:28,850
the resource requirement for your nodes varies. CSPs like GCP and AWS automatically

30
00:02:28,850 --> 00:02:34,100
selects the right sized nodes for you based on the number of nodes in the cluster.

31
00:02:34,100 --> 00:02:39,680
This table shows the size of the instances and their resource specifications for a specific number of

32
00:02:39,680 --> 00:02:40,100
nodes.

33
00:02:40,730 --> 00:02:47,420
If you are deploying on prem nodes then you could probably start with these numbers as base. Cloud or

34
00:02:47,420 --> 00:02:48,080
Onprem?

35
00:02:48,140 --> 00:02:53,840
We have already discussed that all of these deployment options are available in any environment. For

36
00:02:53,840 --> 00:02:54,830
on-prem

37
00:02:54,830 --> 00:02:57,120
kubeadm is a very useful tool.

38
00:02:57,200 --> 00:03:02,780
Google Container engine makes provisioning kubernetes clusters on GCP very easy.

39
00:03:02,780 --> 00:03:08,990
It comes with one-click cluster upgrade features that makes it very easy to maintain the cluster. KOPS

40
00:03:09,050 --> 00:03:15,890
is a nice tool to deploy kubernetes cluster on AWS and the Azure Kubernetes Service or AKS

41
00:03:15,980 --> 00:03:23,400
helps in managing the hosted kubernetes environment on Azure. Depending on the workloads configured, your

42
00:03:23,400 --> 00:03:30,600
node and disk configurations will differ. For High Performance workloads rely on SSD Backed Storage. For

43
00:03:30,600 --> 00:03:32,680
multiple concurrent access

44
00:03:32,730 --> 00:03:38,410
consider network based storage. For shared access to volumes across multiple PODs,

45
00:03:38,490 --> 00:03:42,910
Consider persistent storage volumes that we discussed in the storage section.

46
00:03:43,050 --> 00:03:49,230
Consider defining different classes of storage and allocating the right class to the right applications.

47
00:03:49,320 --> 00:03:53,410
The Nodes forming a kubernetes cluster can be physical or virtual

48
00:03:53,460 --> 00:03:59,740
In our case we will be deploying virtual machines on VirtualBox environments has nodes of our cluster.

49
00:03:59,850 --> 00:04:05,100
You may chose to deploy on physical machines or virtual machines or cloud environments like GCP,

50
00:04:05,260 --> 00:04:09,140
AWS, Azure or any other platform of your choice.

51
00:04:09,180 --> 00:04:14,550
We will be building a cluster with three nodes one master and two worker nodes.

52
00:04:14,550 --> 00:04:19,860
Now We know that master nodes are for hosting control plane components like the kube-api server, etcd

53
00:04:19,860 --> 00:04:24,030
server and others, while worker nodes for hosting workloads.

54
00:04:24,030 --> 00:04:26,830
However this is not a strict requirement.

55
00:04:26,850 --> 00:04:32,580
The master nodes are also considered as nodes and can host workloads. As a best practice

56
00:04:32,580 --> 00:04:38,370
it is recommended to dedicate master nodes for control plane components only specially in a production

57
00:04:38,370 --> 00:04:39,660
environment.

58
00:04:39,660 --> 00:04:46,350
Deployment tools like kubeadm prevent workloads from being hosted on master nodes by adding a taint to

59
00:04:46,350 --> 00:04:47,850
the master node.

60
00:04:48,010 --> 00:04:52,160
You must use 64 bit Linux operating system for nodes.

61
00:04:52,240 --> 00:04:57,200
Another thing to note is that typically you have all the control plane components on the master nodes.

62
00:04:57,370 --> 00:05:03,460
However, in large clusters you may chose to separate the ETCD clusters from the master node to its

63
00:05:03,550 --> 00:05:05,380
own cluster nodes.

64
00:05:05,410 --> 00:05:09,100
We will discuss more about the different topologies for that in the upcoming lecture

65
00:05:09,130 --> 00:05:14,080
when we talk about high availability setup. Well those are some of the considerations for designing a

66
00:05:14,080 --> 00:05:15,360
kubernetes cluster.

67
00:05:15,370 --> 00:05:20,490
Refer to the links in the references section for more details and some interesting reads.

68
00:05:20,560 --> 00:05:22,040
Well that's it for this lecture.

69
00:05:22,180 --> 00:05:28,420
Before you go from our certification exam standpoint there's really nothing much you need to remember

70
00:05:28,420 --> 00:05:29,200
from this section.

71
00:05:29,200 --> 00:05:34,540
You don't have to memorize the numbers that we discussed as these are available in the documentation

72
00:05:34,540 --> 00:05:41,660
page well we'll get into more interesting topics in the upcoming lectures in this section where we will

73
00:05:41,660 --> 00:05:46,530
provision an actual cluster from scratch by ourselves.

74
00:05:46,940 --> 00:05:48,820
Well that's it for this lecture.

75
00:05:48,860 --> 00:05:50,000
I'll see you in the next election.
