WEBVTT

00:00:04.210 --> 00:00:08.130
We'll give everyone another minute or two to jump in here.

00:00:08.790 --> 00:00:11.010
All right, let's go ahead and get started here.

00:00:13.030 --> 00:00:18.790
Can you think of a reason you may want to encrypt etcd communication?

00:00:19.350 --> 00:00:19.630
Yeah.

00:00:19.930 --> 00:00:26.830
So with our etcd in a control plane, let's say we have three control planes across three VMs.

00:00:26.830 --> 00:00:31.010
We have cross traffic on the network between the VMs.

00:00:31.010 --> 00:00:36.610
and etcd contains important information some of it is encrypted some is not

00:00:38.530 --> 00:00:46.050
and so we want to encrypt that communication between etcd in the api server and between etcd

00:00:46.050 --> 00:00:51.410
instances can you think of a reason you may want node to node or pod to pod encryption

00:00:52.530 --> 00:01:00.930
so when kubernetes first started keep in mind it borrowed from the cloud and so we use tls

00:01:00.930 --> 00:01:07.430
certificates inside each application. So imagine that you had a multi-thousand node cluster, which

00:01:07.430 --> 00:01:13.050
is the way things were done for the large clusters, and you had to update certs inside every

00:01:13.050 --> 00:01:20.650
application. Imagine how many certs you would have to update. And so one of the ways that

00:01:20.650 --> 00:01:26.910
we have fixed that is we have node-to-node and pod-to-pod encryption capabilities now within

00:01:26.910 --> 00:01:35.150
Kubernetes cluster and then we have a single TLS cert which comes in to the gateway API and it

00:01:35.150 --> 00:01:42.910
issues its own certs. It controls the issuing of certs generally through cert manager for each

00:01:43.710 --> 00:01:54.270
ingress or each ATTP route or each TLS route etc or soon to be TCP route if it's encrypted.

00:01:55.250 --> 00:02:00.610
So we can encrypt it with a cert now into either the ingress or the gateway API.

00:02:01.590 --> 00:02:06.010
And then we have node-to-node and pod-to-pod tunnels, encrypted tunnels.

00:02:06.130 --> 00:02:11.990
In some cases, it's double encrypted for the remainder of the traffic between the cluster.

00:02:12.810 --> 00:02:17.530
And it really simplified the management of Kubernetes clusters.

00:02:17.530 --> 00:02:24.030
Even a 10-node cluster requires updating certs the old way that we did that.

00:02:24.270 --> 00:02:30.150
on applications and now we we generally no longer have to do that we don't have

00:02:30.150 --> 00:02:35.490
to terminate the cert at the application level we can terminate the cert at the

00:02:35.490 --> 00:02:39.330
ingress or gateway API level. What would happen to a cluster if the Kubernetes

00:02:39.330 --> 00:02:45.470
API server were unavailable? So although the cluster you could interact with the

00:02:45.470 --> 00:02:53.210
pods with the cry CTL but the Kube API server is basically how you would

00:02:53.210 --> 00:03:01.050
communicate with the scheduler and etcd and so if it is down then essentially the cluster is down

00:03:01.770 --> 00:03:09.530
and if we lose our kube api server and we lose all three kube api servers and generally speaking

00:03:09.530 --> 00:03:18.890
we've lost the cluster um yeah so the pods will continue to run unless there's something a

00:03:18.890 --> 00:03:26.810
resource that needs to be handled, in which case it would not be able to start up a new resource.

00:03:27.530 --> 00:03:33.610
It also won't be able to terminate a resource. So generally speaking,

00:03:34.650 --> 00:03:42.010
your applications might continue to work. Eventually, it'll go into a full failure state.

00:03:42.010 --> 00:03:48.970
yeah yeah so it yeah no if you lose all three api servers and you lose all your control plane nodes

00:03:48.970 --> 00:03:54.770
you have a brainless cluster if that makes sense and so some things will continue to operate on

00:03:54.770 --> 00:04:03.830
autopilot until they begin to fail yeah and then eventually it'll go into you know yeah so a highly

00:04:03.830 --> 00:04:10.710
available control plane and so by building a highly available control plane and i will um

00:04:10.710 --> 00:04:19.710
We'll do a little bit with Minikoo, but then I'll also do that with your own cluster and show you what happens when we have a highly available control plane.

00:04:19.710 --> 00:04:26.710
And you can see that it fails over fairly quickly to the next control plane and the next.

00:04:26.710 --> 00:04:31.710
Generally, I don't see three API servers go down.

00:04:31.710 --> 00:04:38.710
What I see is a non-HA, where you have three control planes, but they're non-HA, where the HA wasn't set up correctly.

00:04:38.710 --> 00:04:45.430
and in that case you only need to lose your primary control plane node and then

00:04:45.430 --> 00:04:52.650
you lose your cluster. So having a proper HA setup is key. Can you think of a

00:04:52.650 --> 00:04:56.770
reason why you might not want to run your control plane nodes on shared

00:04:56.770 --> 00:05:02.410
resource virtual machines or shared resource virtual servers? Those are the

00:05:02.410 --> 00:05:10.410
cheap cloud servers. If you're looking at your, you know, lower cost cloud providers, they give

00:05:10.410 --> 00:05:19.830
you a choice of, you know, a VM where you have your own resources or where you share the resources

00:05:19.830 --> 00:05:27.910
with other VMs. General, a lot more cost effective. Yeah, so competition for resources. And so

00:05:27.910 --> 00:05:35.830
basically um your cluster can be pared down to 0.01 vcpus when you share the resource and that

00:05:35.830 --> 00:05:41.630
control plane actually needs if you're expecting you know two cpus two vcpus you need those two

00:05:41.630 --> 00:05:49.810
vcpus right so temporarily you're pared down to 0.01 because something else is consuming that

00:05:49.810 --> 00:05:54.370
for some other client that purchased those vms that's not going to be good for your control

00:05:54.370 --> 00:06:01.810
plane. Right. Right. Right. And so that's why the shared resource, it's okay for development

00:06:03.490 --> 00:06:09.010
if you're running this in the cloud, but in production, you would not want to share the

00:06:09.010 --> 00:06:14.130
control plane resource. If you could choose the two most valuable components in a control plane

00:06:14.130 --> 00:06:20.370
node, what would they be? Correct. So Kube API server and etcd data store. Without them,

00:06:20.370 --> 00:06:24.210
you will not be able to access the cluster or read the current state of the cluster.

00:06:24.210 --> 00:06:29.970
All right, let's get into our first practice.

00:06:29.970 --> 00:06:32.150
Okay, we're gonna start up Minikube.

00:06:32.150 --> 00:06:35.510
We're gonna ensure a fresh environment.

00:06:35.510 --> 00:06:38.390
And we are going to check the Kubernetes version.

00:06:38.390 --> 00:06:42.010
Oh yes, yeah, go ahead and I think control C out of that.

00:06:42.010 --> 00:06:44.630
And then you will,

00:06:46.350 --> 00:06:50.330
Minikube stop and then Minikube start, I think.

00:06:50.330 --> 00:06:52.850
I don't think we were doing too much in that last exercise,

00:06:52.850 --> 00:06:56.630
so we should still be able to read back the version.

00:06:56.630 --> 00:06:59.810
I don't think so. I think we just ran minicoop on that last one.

00:06:59.930 --> 00:07:00.070
Yeah.

00:07:00.230 --> 00:07:01.390
No, no, that's fine.

00:07:02.610 --> 00:07:05.110
We'll have multiple profiles as we go along.

00:07:05.390 --> 00:07:13.970
But if you frag your cluster or frag your VM, all you have to do is close it out and then restart it again.

00:07:14.390 --> 00:07:15.290
And everything will come back.

00:07:15.350 --> 00:07:16.810
All right, how do we check the version again?

00:07:18.130 --> 00:07:20.430
Use a kubectl command line tool.

00:07:21.270 --> 00:07:24.990
And we use that option, that hyphen O of wide.

00:07:25.950 --> 00:07:33.930
Based on the version shown, what is the anticipated EOL or end-of-life date for everyone to run that?

00:07:34.770 --> 00:07:36.030
Looks like everyone has run it.

00:07:37.230 --> 00:07:40.590
And what task will need to be performed by this EOL date?

00:07:40.610 --> 00:07:40.850
Correct.

00:07:42.770 --> 00:07:48.390
Yep, 2026, 1027, and by this day, we will need to do what?

00:07:49.210 --> 00:07:49.730
Correct.

00:07:49.830 --> 00:07:51.150
Or it could be 1.36.

00:07:51.150 --> 00:07:53.250
We might be on .2 by then.

00:07:53.250 --> 00:08:01.710
so we could be on 1.36.2 so we just bump a version just skip 1.35 and go to 1.36 that's

00:08:01.710 --> 00:08:07.150
assuming you hadn't already been upgrading on a three or four or six month schedule you could

00:08:07.150 --> 00:08:14.630
technically go till then if most clusters will go for 12 months max and then there's a lot of

00:08:14.630 --> 00:08:20.110
maintenance you have to do manually and that's because they design them so that with infrastructure

00:08:20.110 --> 00:08:25.550
is code you're either updating the version through IAC spinning up a new cluster or you're manually

00:08:25.550 --> 00:08:31.790
updating it as you go along and so there are things that will start to time out need to be

00:08:31.790 --> 00:08:38.590
updated after 12. okay I'm sure you have a fresh minicoop profile and we are going to this time so

00:08:38.590 --> 00:08:47.070
minicoop delete double hyphen all after you minicoop stop oh hey John correct yeah so

00:08:47.070 --> 00:08:54.110
kubectl stop or minikub stop and then minikub delete double hyphen all and then we have a

00:08:54.110 --> 00:09:00.750
different start command for minikub we're going to do ha this one will be minikub start double

00:09:00.750 --> 00:09:06.510
hyphen ha i can see and we'll be using the container d for our container runtime

00:09:10.110 --> 00:09:16.110
we'll see as we get into it um with that and once you have that up just go ahead and get the nodes

00:09:17.070 --> 00:09:18.390
Let's see what we have there.

00:09:18.470 --> 00:09:20.570
This does take a little bit longer to spin up with HA.

00:09:20.750 --> 00:09:24.490
It's spinning up three nodes, so three containers in Docker,

00:09:24.690 --> 00:09:27.370
and each of those containers is a node, and then it has to join.

00:09:27.530 --> 00:09:29.550
Container 2 joins container 1.

00:09:29.710 --> 00:09:31.110
Container 3 joins container.

00:09:31.110 --> 00:09:34.170
And then once it's up, you can check your nodes.

00:09:35.530 --> 00:09:41.750
Yeah, so the first one is up quickly, but number 2, or actually it's called

00:09:41.750 --> 00:09:52.130
dash 02 and dash 03 I believe is what you'll have there and those have to join so instead of just

00:09:52.130 --> 00:09:59.210
spinning up they have to join and minicube well it's just listed by itself that's actually 01

00:09:59.210 --> 00:10:06.550
but it's just called minicube it has to recognize them as joining so it does take some time it does

00:10:06.550 --> 00:10:13.270
sequentially. So it does minicube, then it does minicube02 and waits, and then it does minicube03.

00:10:13.270 --> 00:10:20.550
And let's see if it's a happy cluster. Minicube profile list. And tell me what the status is.

00:10:20.550 --> 00:10:27.510
Ah, Kubernetes SIG team has a sense of humor. And we can get the status of the cluster minicube

00:10:27.510 --> 00:10:33.990
status. All right, as this practice denotes, we're going to delete a control plane node.

00:10:33.990 --> 00:10:39.710
How do we do that with Minikube?

00:10:39.710 --> 00:10:40.710
We have three nodes.

00:10:40.710 --> 00:10:46.710
We have Minikube, which is 01, and then we have hyphen 02, right?

00:10:46.710 --> 00:10:53.170
Let's see what you guys have on your screen there, but it should say, does your second

00:10:53.170 --> 00:10:59.110
one say Minikube M02 hyphen M02?

00:10:59.110 --> 00:11:08.370
Okay, so you're going to minikubenode delete M02, I believe.

00:11:08.370 --> 00:11:12.510
And we're going to check the status in our profile list.

00:11:12.510 --> 00:11:15.190
Check our profile list.

00:11:15.190 --> 00:11:18.390
All right, and then you can check your nodes again and you'll see that you only have two

00:11:18.390 --> 00:11:19.390
nodes present.

00:11:19.390 --> 00:11:21.950
Now let's add a control plane node back in.

00:11:21.950 --> 00:11:24.090
Yeah, it appears so.

00:11:24.090 --> 00:11:28.930
It appears they don't start with zero and O2 is gone forever, so I don't think we'll

00:11:28.930 --> 00:11:35.810
get that one back. If you notice when you check your nodes, I think you'll have a minicube,

00:11:35.810 --> 00:11:42.450
minicube03, minicube04, I think. And if you do your profile list, it should say,

00:11:44.290 --> 00:11:49.010
let's say when you check your profile list, we're happy. All right, let's add a worker node.

00:11:49.570 --> 00:11:55.810
Let's see here. Very simple for minicube, node, add, don't wipe, and worker. And then once you

00:11:55.810 --> 00:12:01.330
run that and you can get your nodes uh-oh you guys breaking your vms already out of the gate all right

00:12:03.730 --> 00:12:09.970
so to keep you from spending hours on the internet let's uh

00:12:11.330 --> 00:12:16.210
and you will probably run into this on your own if you use minicube on your own as well

00:12:16.210 --> 00:12:22.850
so how we fix this is we need to increase the max user watches and the max user instances

00:12:23.650 --> 00:12:27.250
So we have two commands we throw in, so we echo those into the terminal.

00:12:27.810 --> 00:12:33.650
Let's type those in one at a time, and then the third command we just do sudo system control

00:12:33.650 --> 00:12:42.460
hyphen p, and there we get the sudo system control hyphen p. Let's see, yep looks like it. All right,

00:12:42.460 --> 00:12:49.020
so now we need to delete that worker node, that frag. It's not getting that thing running again,

00:12:49.020 --> 00:12:54.140
so let's go ahead and delete the name of the worker node. And where do we find the name?

00:12:55.100 --> 00:12:56.780
Several ways we might be able to find it.

00:12:58.780 --> 00:13:03.900
Pennycube status. Yeah, I think so. I think everyone will probably have the same name.

00:13:04.540 --> 00:13:10.940
Pennycube node delete and then m05. And once that's deleted, let's check the status of the

00:13:10.940 --> 00:13:15.660
cluster. Make sure it's gone. All right. And you understand the general concept that had that,

00:13:15.660 --> 00:13:20.540
it worked. It would have created a worker node correctly. We don't need to run that command again.

00:13:20.540 --> 00:13:27.740
All right, and now we have our VM set up to run. High availability with Minikube.

00:13:27.740 --> 00:13:31.460
So it can have a lot of... there's a lot going on behind the scenes with Minikube.

00:13:31.460 --> 00:13:37.520
It's a docker running three or more containers in HA, and each of those

00:13:37.520 --> 00:13:42.740
containers has a lot going on. And all of that's operating off of one file system,

00:13:42.740 --> 00:13:47.300
your VM. So that's why we had to make those changes. Okay, so now we're going to

00:13:47.300 --> 00:13:52.060
try this with cilium. We're going to, okay you can control C out, and then just

00:13:52.060 --> 00:13:56.740
minicube stop and then minicube delete hyphen hyphen all. And in this case it's

00:13:56.740 --> 00:14:02.860
important to do the delete all because now we have a failed node in our profile.

00:14:02.860 --> 00:14:10.940
And once you've deleted that profile let's spin up at HA with cilium. So

00:14:10.940 --> 00:14:16.020
again minicube start double hyphen HA which we've done before. But this time we

00:14:16.020 --> 00:14:23.060
a double hyphen cni equals false because we have to tell if we're going to use a cni properly we

00:14:23.060 --> 00:14:29.220
have to tell kubernetes that we don't have a cni um don't ask me why they designed it that way

00:14:30.420 --> 00:14:38.180
but it has to do with um we need to install a cni fresh with a cluster in a blank state it just does

00:14:38.180 --> 00:14:46.580
not work correctly if we install it with a CNI of cilium. It will spin up without a CNI then it'll

00:14:46.580 --> 00:14:55.060
add cilium to it. We're going to do six nodes this time and our container runtime is container D.

00:14:57.990 --> 00:15:03.750
And when that is done we're going to get the nodes and then get the pods.

00:15:07.260 --> 00:15:12.700
Takes a little while doesn't it? We have to spin up six nodes. Three of them have to join together

00:15:12.700 --> 00:15:18.780
and we have to add a CNI into it. That's your Kubernetes SIG team.

00:15:22.490 --> 00:15:28.250
Yeah, I think they're behind the scenes and working on another upgrade to

00:15:28.250 --> 00:15:33.610
MiniKube as well for a lot of advanced features, but it's worked really well.

00:15:33.610 --> 00:15:35.930
We'll get our nodes and get our pods.

00:15:39.050 --> 00:15:43.130
A lot of pods, huh? And I think a few of them might still be settling out.

00:15:43.130 --> 00:15:50.500
So let's make sure we have a happy Minicoop cluster and we can get the status of the cluster.

00:15:52.920 --> 00:15:59.160
All right, let's have some fun. Let's delete a control plane node that contains a Cilium

00:15:59.160 --> 00:16:06.600
operator. So we're going to delete. So we're going to run minicoop node delete minicoop.

00:16:06.600 --> 00:16:12.520
We're going to delete the first control plane. This is technically M01, but it doesn't name it.

00:16:12.520 --> 00:16:16.360
Yeah, because for simplicity's sake, if you run a single node cluster,

00:16:16.360 --> 00:16:21.560
they just named it MiniCube. If you run HA, you would think they could add a little bit of code

00:16:21.560 --> 00:16:27.560
to name it 01, but no. And is it a happy MiniCube cluster after you get the nodes?

00:16:29.000 --> 00:16:38.010
All right, let's continue on. Because this is a demonstration example. There's a

00:16:38.010 --> 00:16:42.810
use case here that they don't have programmed. Now we're going to add a control plane node back in.

00:16:42.810 --> 00:16:50.330
Yeah, and so they still have a little bit of work that they need to do with adding in a CNI of

00:16:50.330 --> 00:16:57.370
psyllium and being able to add and remove control planes. But basically what is happening here is

00:16:57.370 --> 00:17:05.210
it is failing to add the control plane. And you can control C out of it. I think you all should

00:17:05.210 --> 00:17:10.170
have the same stack trace there coming up. So just as an example, you don't need to

00:17:11.450 --> 00:17:17.290
check the nodes because it won't be there. It's not going to be a happy Minikube cluster.

00:17:17.290 --> 00:17:22.410
So what happened? Well, Minikube was silly and if you notice in your pods you had kubep in there.

00:17:23.690 --> 00:17:28.250
Even though you typed in ha, it's not really ha. They still have a little bit that they need to do

00:17:28.250 --> 00:17:36.890
inside of Minikube for configuration. And so when we deleted the Minikube, that was

00:17:36.890 --> 00:17:45.870
the primary control plane, and the HA actually did not work. So it did not, you

00:17:45.870 --> 00:17:51.530
know, failover properly to the other control plane nodes, and Cilium was not

00:17:51.530 --> 00:17:56.930
set up correctly either. So there's a lot more to configuring HA than just typing

00:17:56.930 --> 00:18:03.170
end the double hyphen ha with minicoob and this is similar to what can happen with a production

00:18:03.170 --> 00:18:09.650
ha cluster so when you're adding a node what you just saw take place behind the scenes if you read

00:18:09.650 --> 00:18:16.930
the logs it's very similar to what can happen with the production cluster whenever we're adding

00:18:16.930 --> 00:18:22.690
or removing so the ha steps needed what is the first item needed for ha cluster so we need at

00:18:22.690 --> 00:18:27.010
least one control plane node to start. We start with a single, in this case it's

00:18:27.010 --> 00:18:34.810
minicoob. Then we need a CNI such as cilium. We need a VIP or virtual IP for

00:18:34.810 --> 00:18:40.430
the HA control plane and then we can create two more control planes and join

00:18:40.430 --> 00:18:48.610
them to the cluster. We then provide the VIP to the CNI and control planes which

00:18:48.610 --> 00:18:51.450
which I don't believe they're doing behind the scenes.

00:18:51.450 --> 00:18:52.790
They need to.

00:18:52.790 --> 00:18:56.550
And then we restart the control plane nodes and the CNI.

00:18:56.550 --> 00:18:58.910
And in that case, then Minikube would work.

00:19:00.170 --> 00:19:03.290
All right, let's go on to practice eight.

00:19:03.290 --> 00:19:04.570
Does that make sense to everybody?

00:19:04.570 --> 00:19:08.870
So essentially we used a configuration flag of HA,

00:19:08.870 --> 00:19:13.870
but it didn't really build a full HA control plane for us.

00:19:13.870 --> 00:19:21.030
It did join them, and it's using kubevip, but it's not using the vip correctly,

00:19:21.770 --> 00:19:28.330
and it's not setting the psyllium agents to reference that vip.

00:19:29.010 --> 00:19:33.050
So there's more work that would need to be done to properly set that up as an HA.

00:19:33.550 --> 00:19:38.750
Unfortunately, we don't have the ability to set some of those and restart the services,

00:19:38.750 --> 00:19:45.510
So that's work that the upstream Kubernetes SIG team would need to build those configurations

00:19:45.510 --> 00:19:46.510
in.

00:19:46.510 --> 00:19:49.310
It's a sequencing effort, a considerable sequencing effort.

00:19:49.310 --> 00:19:53.810
Okay, so ensure you have a fresh Minikube environment because this one is fragged.

00:19:53.810 --> 00:19:58.890
Start Minikube with the container due runtime and we're going to check the runtime.

00:19:58.890 --> 00:20:00.990
This one's fragged and then delete the profile.

00:20:00.990 --> 00:20:07.410
The nice thing about Minikube is we can, um, we can wipe it out fairly quickly.

00:20:08.190 --> 00:20:13.950
Um, and so some of our, uh, when we started up, we'll just be using a

00:20:13.950 --> 00:20:16.110
single node, Minikube, so we start it through.

00:20:17.970 --> 00:20:18.450
All right.

00:20:18.490 --> 00:20:20.610
So now we're going to open up two terminals.

00:20:21.050 --> 00:20:26.830
In terminal one, we're going to type kubectl proxy and in terminal two, we're

00:20:26.830 --> 00:20:30.590
going to curl our kubelet config.

00:20:30.590 --> 00:20:36.030
Yeah, so it's a great way to query. Another great Linux tool that we have available to us.

00:20:36.830 --> 00:20:44.110
I use that a lot when I'm debugging clusters. You can also use YQ, but what I've found in,

00:20:44.910 --> 00:20:50.990
you know, query the YAML, but what I've found is it doesn't have all of the options that JQ does.

00:20:52.750 --> 00:21:03.150
Yes, sorry about that. What was that, Stanley? Yeah, so yeah, and with your hyphen O for option,

00:21:03.950 --> 00:21:06.950
You can output as a YAML or JSON.

00:21:06.950 --> 00:21:08.950
YAML is a standard output.

00:21:08.950 --> 00:21:13.950
The problem is that YQ doesn't have all of the features that JQ does.

00:21:13.950 --> 00:21:22.950
And so when we're parsing after the query, it may catch up eventually.

00:21:22.950 --> 00:21:27.950
But it's just that at the current point in time, JQ has a few more options available.

00:21:27.950 --> 00:21:30.950
I would much rather, you know, use YQ.

00:21:30.950 --> 00:21:36.390
So, what is shown as a container runtime endpoint, okay, and then what is shown as a health z

00:21:36.390 --> 00:21:41.820
port and health z bind address.

00:21:41.820 --> 00:21:47.120
You can control-c the tab that you were running kubectl proxy in, and using the same two

00:21:47.120 --> 00:21:48.120
terminals.

00:21:48.120 --> 00:21:51.520
And if you control-c, it'll exit right out of there.

00:21:51.520 --> 00:21:52.520
Okay.

00:21:52.520 --> 00:21:53.520
Is that what you needed to see?

00:21:53.520 --> 00:21:54.520
Oh, yeah.

00:21:54.520 --> 00:21:55.520
Here we go.

00:21:55.520 --> 00:21:56.520
Okay.

00:21:56.520 --> 00:22:04.850
And we'll control-c out of the kubectl proxy because we're going to run a different kubectl

00:22:04.850 --> 00:22:11.090
Kube control proxy now. So using the same two terminals, we're going to modify the Kube control

00:22:11.090 --> 00:22:19.990
proxy to port 8080. And then we're going to curl a different endpoint for the Kube API config,

00:22:20.230 --> 00:22:27.750
again using JQ. And what is shown is an API version. Yep. Which makes sense because we're

00:22:27.750 --> 00:22:35.350
on 1.34, right? Yep. And they will get to 2.0. Yes, correct. Yeah. So where we were

00:22:35.350 --> 00:22:41.390
in terminal one or tab one we are running proxy and then tab two we run

00:22:41.390 --> 00:22:46.690
that curl. I believe that's correct, at least for me anyway, because we're

00:22:46.690 --> 00:22:50.590
proxying from outside of the cluster into the cluster. Okay, so we've got the

00:22:50.590 --> 00:22:56.230
version and then the server address is a cluster address, so it should end in I

00:22:56.230 --> 00:23:02.530
believe a dot two. Okay, and then we can use control C to exit the kubectl proxy

00:23:02.530 --> 00:23:10.960
again and now we're going to have some fun we're going to view the etcd keys out of the key value

00:23:10.960 --> 00:23:18.080
store so we can actually go in and read the etcd database you can type minicube ip just to verify

00:23:18.080 --> 00:23:27.040
but it should be what i provide to you so this is what you'll need to type in and you can once

00:23:27.040 --> 00:23:31.200
you type it in one time you'll be able to use your up arrow key assuming you type it in correctly

00:23:31.760 --> 00:23:38.880
and just modify the last line we'll have several slides that will rework with etcd and you can just

00:23:38.880 --> 00:23:46.000
use it up arrow and reuse this with the exception of the last line but what we're doing here is

00:23:46.000 --> 00:23:53.280
we're exacting into the remember we had a pod called etcd hyphen minicoob and that's our etcd

00:23:53.280 --> 00:24:01.520
data store. And it's in a KubeSystem namespace, so we're exec-ing into that pod just like we would

00:24:01.520 --> 00:24:08.800
docker exec. And then we're using the sh for the shell. And then our command starts with

00:24:08.800 --> 00:24:15.520
etcd control because that CLI tool, control tool, is present in that pod.

00:24:16.640 --> 00:24:20.240
And then we're giving it the endpoints that we want it to hit.

00:24:20.240 --> 00:24:26.700
so we're using kube control and telling it hit this endpoint which is what we just looked up

00:24:26.700 --> 00:24:36.460
in the minikube ip and we're adding a port of 2379 for sed we're providing a ca cert because

00:24:36.460 --> 00:24:45.080
we can't access it without it we're providing a key and we're providing a a cert so it'll verify

00:24:45.080 --> 00:24:53.280
that is an accurate certificate and then we're getting everything after the forward slash

00:24:53.280 --> 00:25:00.400
but the keys only so no data so no value so just the keys without the corresponding value you have

00:25:00.400 --> 00:25:05.060
to make sure you put the double hyphen in front of the beginning of each line yeah at the beginning

00:25:05.060 --> 00:25:11.580
of each line yeah stanley i think you'll want them in front of the endpoints and key as well

00:25:11.580 --> 00:25:13.820
At least you're not showing up on what I can see.

00:25:14.380 --> 00:25:17.480
So I have one, two, three, four, five, I have six lines there.

00:25:17.580 --> 00:25:23.780
So you type the first line in, and as soon as you do the backslash, it'll give you like a caret.

00:25:25.420 --> 00:25:27.320
And then you start typing the second line.

00:25:27.480 --> 00:25:30.620
Just remember to type the double hyphens at the beginning of each line.

00:25:32.180 --> 00:25:35.920
Yeah, endpoints should have a double hyphen in front of it.

00:25:36.000 --> 00:25:37.860
It should be a double hyphen and a space.

00:25:39.420 --> 00:25:41.480
Okay, Stanley, you got yours to work, huh?

00:25:41.580 --> 00:25:46.700
okay okay who said they don't have a bar live minikube i don't know if it's yours here john

00:25:46.700 --> 00:25:51.100
go ahead and do the up arrow and bring that back up and you exit it out of your coop control

00:25:51.100 --> 00:25:58.460
or your uh proxy right okay so yeah with your up arrow go in uh up arrow and then go in and um

00:25:58.460 --> 00:26:14.980
control exec etcd minikube hyphen n kube system and then double hyphen space sh hyphen c etcd

00:26:14.980 --> 00:26:21.900
control backslash and then we have endpoints and then it should be a double hyphen in front of

00:26:21.900 --> 00:26:25.600
CA cert and a double hyphen in front of cert.

00:26:25.600 --> 00:26:28.240
Oh, you have CCRT or no.

00:26:28.240 --> 00:26:30.920
Oh, you need CRT instead of CDRT.

00:26:30.920 --> 00:26:35.000
So Stanley has his, let's see who else needs me

00:26:35.000 --> 00:26:39.360
to look at your, yeah, yeah, let's see here what you got.

00:26:41.760 --> 00:26:42.600
Let's see.

00:26:43.580 --> 00:26:45.720
Okay, let's see, can you, okay,

00:26:45.720 --> 00:26:47.640
and then do the first line as well

00:26:47.640 --> 00:26:49.900
cause that helps it show up when you highlight it.

00:26:49.900 --> 00:26:53.700
Okay, so John's is up and displaying.

00:26:53.700 --> 00:26:55.740
Yeah, once we get this command,

00:26:55.740 --> 00:26:58.660
the five line or six line command correct,

00:26:58.660 --> 00:27:00.720
then you can up arrow and use it

00:27:00.720 --> 00:27:03.500
for the rest of the demonstration.

00:27:03.500 --> 00:27:04.700
Okay, let's see here.

00:27:07.940 --> 00:27:10.080
Ryan, use your up arrow and then highlight

00:27:10.080 --> 00:27:11.400
for the whole command.

00:27:11.400 --> 00:27:12.800
See if you can find one.

00:27:12.800 --> 00:27:15.980
Actually, Ryan, go ahead and delete that second terminal.

00:27:15.980 --> 00:27:18.200
Yeah, delete that one out.

00:27:18.200 --> 00:27:19.940
And then widen the first terminal.

00:27:19.940 --> 00:27:21.200
That'll give us a little bit more room

00:27:21.200 --> 00:27:25.140
And then do you use the up arrow and try to pull up the full command?

00:27:28.240 --> 00:27:29.400
Where'd your command go?

00:27:29.560 --> 00:27:32.840
S-E-D, control, C-T-L.

00:27:32.920 --> 00:27:37.980
Oh, you need a space after the L, between the L and the backslash.

00:27:39.320 --> 00:27:41.260
Yeah, and now go to the next line.

00:27:42.180 --> 00:27:42.700
There you go.

00:27:43.020 --> 00:27:45.200
And then you probably cut and paste.

00:27:45.200 --> 00:27:45.900
Yeah, there you go.

00:27:45.900 --> 00:27:47.700
All right, and then Ralph, are you having issues?

00:27:48.120 --> 00:27:50.180
Yeah, do the up arrow and then highlight.

00:27:51.200 --> 00:27:58.720
and if you get a highlight oh take the uh let's see um yeah if you could highlight

00:27:58.720 --> 00:28:03.600
all the way up to your group control take your cursor and just highlight it that helps me read it

00:28:06.080 --> 00:28:17.440
does that say etcd ctl yep yep cto okay okay and then um for your next three lines you need a space

00:28:18.080 --> 00:28:24.080
so we see 2379 for the port and then you have your backslash you need a space between the port

00:28:24.080 --> 00:28:29.120
number and the backslash oops yeah just uh just run your cursor through it and just add a space

00:28:29.120 --> 00:28:34.400
after two three seven nine and then same for the line below that so we have endpoints see cert key

00:28:34.400 --> 00:28:39.680
and then we're missing uh cert yeah so below key uh you have one line that you're missing

00:28:40.400 --> 00:28:47.040
uh which is cert well let's see here what was that uh ryan just still throwing an error oh

00:28:47.040 --> 00:28:56.240
yeah yeah go ahead and hit in it looks good but oh we must have something spelled incorrectly

00:28:56.800 --> 00:29:04.000
highlight it and i'll take a look at it you have an equal sign after ca cert and then you have var

00:29:04.000 --> 00:29:08.480
live does endpoints have a double hyphen in front of it uh wait a second i'll come back to that

00:29:09.680 --> 00:29:15.720
Let's see, Ralph, how are you doing?

00:29:15.720 --> 00:29:16.800
There we go.

00:29:16.800 --> 00:29:18.340
That might work.

00:29:18.340 --> 00:29:19.720
No?

00:29:19.720 --> 00:29:23.380
Oh, okay, your key server, it should say server.key.

00:29:23.380 --> 00:29:24.740
All right, let's see here.

00:29:24.740 --> 00:29:26.400
Let's come back here to Ryan.

00:29:27.700 --> 00:29:30.380
You can hit your up arrow and then highlight everything

00:29:30.380 --> 00:29:31.500
after you hit the up arrow,

00:29:31.500 --> 00:29:33.400
all the way through food control.

00:29:33.400 --> 00:29:34.240
There we go.

00:29:35.640 --> 00:29:36.520
Yeah, that's correct.

00:29:36.520 --> 00:29:38.880
I can do a space in front of get.

00:29:38.880 --> 00:29:40.040
That's weird.

00:29:40.040 --> 00:29:42.160
It should, that's weird.

00:29:42.160 --> 00:29:46.400
up with that. All right, try enter. Let's see what happens. It doesn't like the CA cert.

00:29:59.230 --> 00:30:04.270
Before I mess this whole, uh, that sometimes works and sometimes, um,

00:30:06.270 --> 00:30:14.190
that destroys the training. We'll see. All right. All right. So now you all have the

00:30:14.190 --> 00:30:18.510
screen that you need and you'll be able to use your up arrow. Okay. Let me figure out where.

00:30:18.510 --> 00:30:24.020
Yeah, just the one with the five line graph.

00:30:24.020 --> 00:30:25.020
Okay.

00:30:25.020 --> 00:30:29.400
And so you can remove the keys only command, so do your up arrow, and then remove the double

00:30:29.400 --> 00:30:31.480
hyphen keys only and see what it outputs.

00:30:31.480 --> 00:30:32.620
Keep the double quote there, though.

00:30:32.620 --> 00:30:37.740
Yeah, you can just move your cursor over, Ralph, and just delete the double hyphen keys

00:30:37.740 --> 00:30:38.740
only.

00:30:38.740 --> 00:30:39.740
Just hit the left arrow.

00:30:39.740 --> 00:30:40.740
There you go.

00:30:40.740 --> 00:30:41.740
No.

00:30:41.740 --> 00:30:46.360
Yeah, just the double quote after prefix.

00:30:46.360 --> 00:30:54.600
so this shows you everything keys and values and we'll do you can if you scroll through you'll see

00:30:54.600 --> 00:31:04.440
that with the prior command we have one secret and several config maps so now if you go back

00:31:04.440 --> 00:31:09.720
and run keys only this exercise will be easier so do your up arrow and just do keys only run

00:31:09.720 --> 00:31:17.320
that and we're going to search for the bootstrap token secret and how that will work is as soon as

00:31:17.320 --> 00:31:23.400
you find and copy the entire string for the bootstrap token secret starting with the forward

00:31:23.400 --> 00:31:29.880
slash it'll say forward slash registry so copy the entire string and that will be under secrets

00:31:29.880 --> 00:31:34.840
yep it'll say registry secrets and they'll say kube system bootstrap token and so what you'll

00:31:34.840 --> 00:31:41.480
do is just like i have up on the screen you have get a space and then everything you just copied

00:31:41.480 --> 00:31:48.040
goes in there and then the double quote and might make it easier ralph if you use the up arrow and

00:31:48.040 --> 00:31:55.800
go back to where you had the command with keys only there you go and hit that there we go and

00:31:55.800 --> 00:32:03.640
then just scroll up to where it says registry secrets scroll down there we go and copy that

00:32:03.640 --> 00:32:08.680
entire line starting with the forward forward slash. If you're wondering how to

00:32:08.680 --> 00:32:15.340
paste I think we have to right click and then select paste. It's kind of basic on

00:32:15.340 --> 00:32:23.140
our cut and paste abilities. As you can see it's all in plain text right? Yeah

00:32:23.140 --> 00:32:30.080
definitely not encrypted. Okay and we can we have several more we could look at

00:32:30.080 --> 00:32:34.840
such as config map but I think you guys get the idea this is what the data store

00:32:34.840 --> 00:32:39.900
looks like inside of etcd so nothing really special there it's just a data

00:32:39.900 --> 00:32:45.100
store it's key value pairs but you can see where on secrets where we have

00:32:45.100 --> 00:32:49.620
credentials involved we would want to encrypt this data right so we would not

00:32:49.620 --> 00:32:57.180
want to be able to just be able to read this in a plain text format so you're

00:32:57.180 --> 00:33:04.200
looking at is unencrypted okay so now we're going to doing certificates and

00:33:04.200 --> 00:33:10.420
config maps which display the same thing the next exercise practice 13 looking at

00:33:10.420 --> 00:33:15.300
this diagram what do you think is missing in this diagram for a high

00:33:15.300 --> 00:33:21.500
availability cluster this comes from the upstream cube sig team and what do you

00:33:21.500 --> 00:33:24.660
think is missing from this for a high availability cluster mean like a VIP

00:33:24.660 --> 00:33:33.500
okay uh ralph john ryan who's it we do yeah this is a little mistake from the upstream cube

00:33:33.500 --> 00:33:43.160
sig team yeah yeah yeah and yeah and then a vip in front of it except that in a uh in a cloud

00:33:43.160 --> 00:33:50.500
because it's universal we wouldn't have a vip we would have a load balancer and on bare metal we

00:33:50.500 --> 00:33:54.340
have a vip because we can't technically do a load balance. So you were kind of

00:33:54.340 --> 00:34:04.000
correct, Stanley, in that we would have something in front of it but also

00:34:04.000 --> 00:34:10.240
this is what it should look like for bare metal and optionally for the cloud we

00:34:10.240 --> 00:34:18.960
have this cloud controller manager here so we have three of each so okay lesson two review

00:34:20.480 --> 00:34:26.160
learn how kubernetes nodes and pods work together how kubernetes components work together about

00:34:26.160 --> 00:34:31.840
kubernetes versioning what is the estimated life cycle of a kubernetes cluster in a y

00:34:31.840 --> 00:34:35.760
learn how to scale and upgrade kubernetes clusters and got to see what happens

00:34:35.760 --> 00:34:42.060
in a simulated failure. We learned how control plane nodes must be scaled in

00:34:42.060 --> 00:34:48.780
odd numbers due to etcd. Scaling downward involves coordinating, draining, and

00:34:48.780 --> 00:34:54.300
deleting. Scaling upward involves creating, joining, and uncoordinating. We learned that

00:34:54.300 --> 00:35:01.680
upgrading a node requires coordinating a node. Then drain, upgrade, restart, and

00:35:01.680 --> 00:35:03.480
Finally, uncoordinate the node.

00:35:03.480 --> 00:35:06.020
Cluster scaling using IEC is easier

00:35:06.020 --> 00:35:07.700
with stateless workloads.

00:35:08.780 --> 00:35:12.440
Simple as creating a new cluster with IEC.

00:35:12.440 --> 00:35:15.680
Then set workload state with the Clarity GitOps.

00:35:16.820 --> 00:35:18.660
After reaching the desired state,

00:35:18.660 --> 00:35:21.620
we then transfer the DNS to the new cluster ingress

00:35:21.620 --> 00:35:22.880
or gateway API,

00:35:23.960 --> 00:35:26.140
and then monitor the new cluster for any issues.

00:35:26.140 --> 00:35:27.080
We're learning how to scale

00:35:27.080 --> 00:35:29.380
a Minikube HA cluster plane down,

00:35:29.380 --> 00:35:30.620
control plane down,

00:35:30.620 --> 00:35:33.420
how to scale a mini kube HA control plane up,

00:35:33.420 --> 00:35:35.480
how to scale a worker node,

00:35:35.480 --> 00:35:38.580
how complex HA setups may be more difficult,

00:35:39.520 --> 00:35:42.620
what happens when the primary control plane goes offline.

00:35:42.620 --> 00:35:44.920
Learn how to read the kubelet config,

00:35:44.920 --> 00:35:47.880
how to read the kube API server config,

00:35:47.880 --> 00:35:50.180
how to read etcd keys.

00:35:50.180 --> 00:35:53.490
Can I take the mystery out of that?

00:35:53.490 --> 00:35:56.790
How to read a secret value for an etcd key.

00:35:58.230 --> 00:36:01.650
And we did not do config maps, but it's the same principle.
