Hello and welcome to this lecture. In this lecture
we will discuss about designing a kubernetes cluster. Before you head into designing a cluster.
I must ask the following questions.
What is the purpose of this cluster?
Is it for learning or development or testing purpose or for hosting production grade applications.
What is the cloud adoption at your organization?
Do you prefer your platform to be managed by a cloud provider or a self hosted?
What kind of workloads are you going to run on this cluster?
How many applications are to be hosted on the Cluster?
Few or many?
What kind of applications are going to be hosted on the Cluster? Web applications or big data or analytics?
Depending on the kind of application the resource requirements may vary.
What type of network traffic are these applications expecting?
Continuous heavy traffic or burst?
Well let's try and break down some of these.
If you want to deploy a cluster for learning purposes then a solution based on minikube or a single
node cluster deployed using kubeadm on local VMs or cloud providers like GCP or AWS should do.
We have deployed such a cluster in the beginners course. To deploy a cluster for development and testing
purposes, and multi node cluster with single master and multiple worker nodes would help.
Again kubeadm is an appropriate tool. Or if on managed cloud environments, then quickly provision a
cluster on GCP, AWS or AKS on Azure. Letâ€™s talk about
production level clusters. For hosting production grade applications.
a High Availability Multi node cluster with multiple master nodes is recommended.
We look at more details about High Availability setup with multiple-master nodes later in this section.
Again this can be setup with kubeadm or GCP or using kops on AWS or other supported platforms.
You can have upto 5000 nodes in the cluster, a total of 150k PODs in the cluster,
300,000 containers in total and upto 100 PODs per node. Depending on the size of your
cluster.
the resource requirement for your nodes varies. CSPs like GCP and AWS automatically
selects the right sized nodes for you based on the number of nodes in the cluster.
This table shows the size of the instances and their resource specifications for a specific number of
nodes.
If you are deploying on prem nodes then you could probably start with these numbers as base. Cloud or
Onprem?
We have already discussed that all of these deployment options are available in any environment. For
on-prem
kubeadm is a very useful tool.
Google Container engine makes provisioning kubernetes clusters on GCP very easy.
It comes with one-click cluster upgrade features that makes it very easy to maintain the cluster. KOPS
is a nice tool to deploy kubernetes cluster on AWS and the Azure Kubernetes Service or AKS
helps in managing the hosted kubernetes environment on Azure. Depending on the workloads configured, your
node and disk configurations will differ. For High Performance workloads rely on SSD Backed Storage. For
multiple concurrent access
consider network based storage. For shared access to volumes across multiple PODs,
Consider persistent storage volumes that we discussed in the storage section.
Consider defining different classes of storage and allocating the right class to the right applications.
The Nodes forming a kubernetes cluster can be physical or virtual
In our case we will be deploying virtual machines on VirtualBox environments has nodes of our cluster.
You may chose to deploy on physical machines or virtual machines or cloud environments like GCP,
AWS, Azure or any other platform of your choice.
We will be building a cluster with three nodes one master and two worker nodes.
Now We know that master nodes are for hosting control plane components like the kube-api server, etcd
server and others, while worker nodes for hosting workloads.
However this is not a strict requirement.
The master nodes are also considered as nodes and can host workloads. As a best practice
it is recommended to dedicate master nodes for control plane components only specially in a production
environment.
Deployment tools like kubeadm prevent workloads from being hosted on master nodes by adding a taint to
the master node.
You must use 64 bit Linux operating system for nodes.
Another thing to note is that typically you have all the control plane components on the master nodes.
However, in large clusters you may chose to separate the ETCD clusters from the master node to its
own cluster nodes.
We will discuss more about the different topologies for that in the upcoming lecture
when we talk about high availability setup. Well those are some of the considerations for designing a
kubernetes cluster.
Refer to the links in the references section for more details and some interesting reads.
Well that's it for this lecture.
Before you go from our certification exam standpoint there's really nothing much you need to remember
from this section.
You don't have to memorize the numbers that we discussed as these are available in the documentation
page well we'll get into more interesting topics in the upcoming lectures in this section where we will
provision an actual cluster from scratch by ourselves.
Well that's it for this lecture.
I'll see you in the next election.