1
00:00:02,360 --> 00:00:05,070
So at this point, we deployed our

2
00:00:05,070 --> 00:00:09,780
Kubernetes-managed application to this EKS cluster.

3
00:00:09,780 --> 00:00:14,450
We got two different kinds of pods running in there.

4
00:00:14,450 --> 00:00:16,620
Two different kinds of deployments

5
00:00:16,620 --> 00:00:20,990
and therefore also different services attached to them.

6
00:00:20,990 --> 00:00:24,770
One of the services, the auth-service is clustered internal.

7
00:00:24,770 --> 00:00:27,450
The other service uses a load balancer,

8
00:00:27,450 --> 00:00:31,690
which was created automatically by AWS as you saw.

9
00:00:31,690 --> 00:00:35,300
We're letting these services communicate with each other,

10
00:00:35,300 --> 00:00:39,430
with help off this automatic domain name,

11
00:00:39,430 --> 00:00:40,573
which has generated.

12
00:00:41,450 --> 00:00:45,423
And we're using a volume, we're using an EFS volume,

13
00:00:46,283 --> 00:00:49,150
using that CSI volume type Kubernetes offers.

14
00:00:49,150 --> 00:00:52,140
And with that we got all the core topics,

15
00:00:52,140 --> 00:00:55,470
which I had a close look in detail over the last sections

16
00:00:55,470 --> 00:01:00,470
applied in action on this real cluster here hosted by AWS.

17
00:01:03,330 --> 00:01:05,500
Now it's time to practice.

18
00:01:05,500 --> 00:01:08,630
And for that, attached, you find a brand new

19
00:01:08,630 --> 00:01:13,630
auth-api, tasks-api, and users-api folder in the attachment,

20
00:01:14,240 --> 00:01:18,220
because I made some code changes in all these apis.

21
00:01:18,220 --> 00:01:21,940
And I added the brand new tasks-api.

22
00:01:21,940 --> 00:01:26,940
And your task will now be to add this task-api

23
00:01:27,460 --> 00:01:29,560
to the Kubernetes cluster.

24
00:01:29,560 --> 00:01:33,230
So start from scratch there, add a new deployment

25
00:01:33,230 --> 00:01:34,840
and a new service.

26
00:01:34,840 --> 00:01:38,460
The tasks-api should be reachable from the outside world.

27
00:01:38,460 --> 00:01:40,920
It should not be clustered internal,

28
00:01:40,920 --> 00:01:44,340
but ensure that the tasks-api is able to talk

29
00:01:44,340 --> 00:01:46,530
to the auth-api.

30
00:01:46,530 --> 00:01:49,130
And you can use the docker-compose file,

31
00:01:49,130 --> 00:01:51,100
which you find the attached as well,

32
00:01:51,100 --> 00:01:55,420
as inspiration on how to set up your tasks deployment.

33
00:01:55,420 --> 00:01:57,800
Here you see the environment variables

34
00:01:57,800 --> 00:01:59,830
which are used in the tasks code,

35
00:01:59,830 --> 00:02:03,020
and of course you should provide these variables

36
00:02:03,020 --> 00:02:05,050
with appropriate values

37
00:02:05,050 --> 00:02:07,983
for your Kubernetes configuration as well.

38
00:02:09,150 --> 00:02:12,560
In addition, I also want to highlight that I had a typo

39
00:02:12,560 --> 00:02:15,970
in the auth-api address environment variable

40
00:02:15,970 --> 00:02:18,810
in the past here in the users-api.

41
00:02:18,810 --> 00:02:23,670
And I fixed that typo now in the users-api code.

42
00:02:23,670 --> 00:02:27,660
So you should also fix it in your docker-compose.yaml file.

43
00:02:27,660 --> 00:02:30,140
And in your users.yaml file

44
00:02:30,140 --> 00:02:32,000
in the Kubernetes folder.

45
00:02:32,000 --> 00:02:36,080
There, where we provide the auth-api address

46
00:02:36,080 --> 00:02:39,040
environment variable make sure it's written like this,

47
00:02:39,040 --> 00:02:41,330
with two S at the end,

48
00:02:41,330 --> 00:02:44,920
not with three as I accidentally had before.

49
00:02:44,920 --> 00:02:47,580
One important note about this challenge by the way,

50
00:02:47,580 --> 00:02:51,160
as I mentioned, it's not just about the tasks-api folder.

51
00:02:51,160 --> 00:02:55,300
I also tweaked some code in users-api and auth-api.

52
00:02:55,300 --> 00:02:58,440
So make sure you also rebuild these images

53
00:02:58,440 --> 00:03:01,410
and you push the updated images to docker hub,

54
00:03:01,410 --> 00:03:03,930
and you then replace your current deployments

55
00:03:03,930 --> 00:03:05,200
with the new ones,

56
00:03:05,200 --> 00:03:08,160
so that all the code changes are picked up.

57
00:03:08,160 --> 00:03:10,560
But with that, that's your challenge.

58
00:03:10,560 --> 00:03:13,130
That's a challenge by me for you.

59
00:03:13,130 --> 00:03:16,551
Add this tasks-api as a new deployment

60
00:03:16,551 --> 00:03:19,980
to this existing Kubernetes EKS cluster.

61
00:03:19,980 --> 00:03:22,530
In the next lecture, we're going to do it together.

