1
00:00:01,150 --> 00:00:03,490
Hello and welcome to this lecture. In this lecture

2
00:00:03,490 --> 00:00:09,430
We look at the networking configurations required on the master and worker nodes in a kubernetes cluster.

3
00:00:09,730 --> 00:00:15,610
The kubernetes cluster consists of master and worker nodes. Each node must have at least 1 interface

4
00:00:15,670 --> 00:00:17,170
connected to a network.

5
00:00:17,170 --> 00:00:19,750
Each interface must have an address configured.

6
00:00:19,750 --> 00:00:24,620
The hosts must have a unique hostname set. As well as a unique MAC address.

7
00:00:24,640 --> 00:00:29,750
You should note this especially if you created the VMs by cloning from existing ones.

8
00:00:29,830 --> 00:00:32,740
There are some ports that needs to be opened as well.

9
00:00:32,770 --> 00:00:35,550
These are used by the various components in the control plane.

10
00:00:35,590 --> 00:00:39,980
The master should accept connections on 6443 for the API server.

11
00:00:40,030 --> 00:00:45,850
The worker nodes, Kubectl tool, external users, and all other control plane components access the

12
00:00:45,850 --> 00:00:50,500
kube-api server via this port. The kubelets on the master and worker nodes listen on

13
00:00:50,500 --> 00:00:52,170
10250. Yes,

14
00:00:52,300 --> 00:00:57,050
in case we didn’t discuss this, the kubelet’s can be present on the master node as well.

15
00:00:57,070 --> 00:01:03,220
The kube-scheduler requires port 10251 to be open. The kube-controller-manager requires port

16
00:01:03,220 --> 00:01:10,180
10252 to be open. The worker nodes expose services for external access on ports 30000 to

17
00:01:10,180 --> 00:01:11,860
32767.

18
00:01:11,950 --> 00:01:13,270
So these should be open as well.

19
00:01:13,330 --> 00:01:17,260
Finally, the ETCD server listens on port 2379.

20
00:01:17,320 --> 00:01:23,020
If you have multiple master nodes, all of these ports need to be open on those as well. And you also need

21
00:01:23,020 --> 00:01:28,240
an additional port 2380 open so the ETCD clients can communicate with each other.

22
00:01:28,270 --> 00:01:33,430
The list of ports to be opened are also available in the kubernetes documentation page.

23
00:01:33,430 --> 00:01:39,430
So consider these when you setup networking for your nodes, in your firewalls, or ip table rules or network

24
00:01:39,430 --> 00:01:45,370
security group in a cloud environment such as GCP or Azure or AWS. And if things are not working

25
00:01:45,430 --> 00:01:50,530
this is one place to look for while you are investigating. Head over to the practice session and explore

26
00:01:50,530 --> 00:01:53,140
the networking setup in the existing environment.

27
00:01:53,140 --> 00:01:56,020
Keep this commands handy while you look for information.

28
00:01:56,050 --> 00:02:01,000
We will start with simple exercises where you will explore an existing kubernetes cluster and view

29
00:02:01,000 --> 00:02:05,040
information about the interfaces, ips, hostnames, ports etc.

30
00:02:05,050 --> 00:02:09,540
This will help you familiarize with the environment and look for information in the future sections.

31
00:02:09,550 --> 00:02:12,580
Going forward we will get into more challenging exercises.

32
00:02:12,640 --> 00:02:14,200
For now let's start slow.
