WEBVTT

00:00:04.270 --> 00:00:09.630
All right, we're going to look at Kubernetes logging and monitoring. Kubernetes monitoring

00:00:09.630 --> 00:00:16.350
enables a collection of data points such as CPU, RAM, network I.O., and storage along with

00:00:16.350 --> 00:00:22.830
pod and node status. Additional metrics that are unique to application resources

00:00:23.550 --> 00:00:30.350
such as DB cluster metrics, uptime, connections, operations, or application latency may also be

00:00:30.350 --> 00:00:35.630
collect. Metrics endpoints can be enabled or added to most services for use with

00:00:35.630 --> 00:00:40.850
metrics collection and visualization platforms. If enabled, metrics may be

00:00:40.850 --> 00:00:45.890
exported from the pod and collected and stored temporarily in a cache or

00:00:45.890 --> 00:00:51.950
persisted in a PV with a PVC. You may need to use a metrics exporter sidecar

00:00:51.950 --> 00:00:58.910
to enable metrics export. Some of the containers within the pod have the

00:00:58.910 --> 00:01:06.170
ability to provide metrics, um, but it's a paid feature or it gets shipped to,

00:01:06.170 --> 00:01:13.970
um, that, um, upstream teams, uh, cloud service, for example.

00:01:14.390 --> 00:01:17.870
Um, and so if you don't want to create an account with them, you can add a

00:01:17.870 --> 00:01:22.790
sidecar and kind of hijack those metrics and then export those metrics to.

00:01:22.790 --> 00:01:29.140
Ah, we have a definition coming up.

00:01:29.140 --> 00:01:30.140
Yeah.

00:01:30.140 --> 00:01:34.140
A great example of one coming up.

00:01:34.140 --> 00:01:37.140
All right, so Kubernetes logging and events.

00:01:37.140 --> 00:01:44.140
Kubernetes logging is not persistent and logs are deleted upon pod deletion.

00:01:44.140 --> 00:01:53.140
If a pod is not deleted, the prior pod logs may be retrieved using the hyphen p flag.

00:01:53.140 --> 00:01:59.820
However, if a pod enters crash loop back-off state and is deleted and recreated, the logs

00:01:59.820 --> 00:02:04.780
are also deleted, often preventing the last log line from being displayed.

00:02:04.780 --> 00:02:09.160
Kubernetes events are available by describing the pod.

00:02:09.160 --> 00:02:13.020
Events persist for an hour and are deleted upon pod deletion.

00:02:13.020 --> 00:02:19.560
Shipping both logs and events is key to successfully troubleshooting any issues that arise with

00:02:19.560 --> 00:02:21.660
a cluster and application deployment.

00:02:23.140 --> 00:02:31.680
Kubernetes core cluster components may be monitored and alerting may be used to notify admins if specific parameters are exceeded.

00:02:31.980 --> 00:02:39.840
A Kubernetes metric server may be utilized for real-time core metrics like CPU and RAM, which is essential for autoscape.

00:02:39.920 --> 00:02:46.660
Prometheus goes beyond the metric server by enabling advanced querying, alerting, and long-term storage.

00:02:46.660 --> 00:02:53.140
Enabling the metric server in the cluster enables the top command for pods and nodes

00:02:53.140 --> 00:02:57.300
and provides a quick method of verifying CPU and RAM consumption.

00:02:58.580 --> 00:03:05.140
The core cluster components which may be monitored are kube api server, core DNS,

00:03:06.580 --> 00:03:14.340
etcd, kubelet, and proxy if you're using proxy. Several core components require additional

00:03:14.340 --> 00:03:23.620
configuration by binding to localhost or 0.0.0.0 instead of the localhost to enable

00:03:23.620 --> 00:03:31.220
monitor. So if you bind it to 0.0.0.0, it is an insecure setting and so that should only be used

00:03:31.220 --> 00:03:38.500
in development. So we should not use that in production. So we can monitor more of our core

00:03:38.500 --> 00:03:43.540
components in development than what we can in production if we have a secure cluster set.

00:03:43.540 --> 00:03:51.340
For our GAP stack, GAP stack is an all-in-one metric solution for enabling shipping, collecting, storing, displaying, and alerting.

00:03:51.460 --> 00:03:57.120
For utilize Loki and Promtail with Grafana, it also enables the same for logging and events.

00:03:57.120 --> 00:04:02.000
And Promtail is now being replaced. It's fully mature now.

00:04:05.020 --> 00:04:11.800
The Kube Prometheus stack HelmChart enables a metrics production stack without needing to individually manage multiple HelmCharts.

00:04:11.800 --> 00:04:20.720
The Grafana repo helm charts for Loki and Promtail enable a logging and event production stack, which is often used with MinIO for storage.

00:04:23.930 --> 00:04:31.410
Grafana enables dashboards to be imported from the Grafana dashboards repo using an ID and revision number.

00:04:31.410 --> 00:04:35.190
Dashboards may also be imported using a config map with JSON.

00:04:35.270 --> 00:04:38.410
Dashboards imported using the UI are not persistent.

00:04:38.410 --> 00:04:44.570
Persistent data sources may be configured in Grafana and Prometheus is the default data

00:04:44.570 --> 00:04:51.050
source for metrics. So even if you have multiple data sources, Prometheus would be the default.

00:04:52.490 --> 00:05:00.360
Loki may be configured as a default data source for logging. Some of our dashboards

00:05:00.360 --> 00:05:12.280
that are available. So we have the node exporter, our DNS, core DNS, our full K8s,

00:05:13.160 --> 00:05:19.960
we can see the health of the cluster, and we have a Mongo dashboard. We can monitor our Redis,

00:05:21.240 --> 00:05:25.560
we can monitor Longhorn for our object storage, and we can monitor our events,

00:05:25.560 --> 00:05:33.000
And then using Loki, okay, query our logs, this is what Prometheus looks like, and here's

00:05:33.000 --> 00:05:34.000
our alert manager.

00:05:34.000 --> 00:05:40.670
We can also add in our database admin interfaces.

00:05:40.670 --> 00:05:45.790
So database admin interface enables the database administrators to manage and configure their

00:05:45.790 --> 00:05:52.470
databases and useful for non admins to enable interaction with the DB in a development environment.

00:05:52.470 --> 00:06:02.070
Kubernetes DB admin UIs that are available, MongoDB, PG Admin, MinIO Tenant, so not the

00:06:02.070 --> 00:06:09.350
operator, just the tenant, and the Longhorn Admin.

00:06:09.350 --> 00:06:14.850
They're deployable with Helm, and they generally require additional security measures for production

00:06:14.850 --> 00:06:15.850
environment.

00:06:15.850 --> 00:06:18.830
Here's an example of a DB admin for MongoDB.

00:06:18.830 --> 00:06:24.630
All right, so moving on to our labs, we're going to install the Kubernetes metric server.

00:06:24.630 --> 00:06:28.230
We're gonna install a DB with an admin UI,

00:06:28.230 --> 00:06:33.230
install Grafana, Prometheus, and Alert Manager.

00:06:33.230 --> 00:06:35.330
We're gonna install a Grafana chart

00:06:35.330 --> 00:06:39.310
that doesn't come with the Grafana installation.

00:06:39.310 --> 00:06:43.010
We're gonna install a metrics sidecar for metrics exporting.

00:06:44.290 --> 00:06:47.310
We're going to install a service monitor,

00:06:47.310 --> 00:06:51.150
and we're gonna use storage nodes for storage resources,

00:06:51.150 --> 00:06:54.850
and install Loki, Prompto, and MinIO if we have time.

00:06:54.850 --> 00:07:01.090
The first step is ensure a fresh Minikubin and start a single node Minikubin.

00:07:01.090 --> 00:07:12.950
Set this up and verify that the pod is ready.

00:07:12.950 --> 00:07:14.470
So sometimes it will hang.

00:07:14.470 --> 00:07:20.430
It requires two complete cycles to start up and if that happens then you can just uninstall

00:07:20.430 --> 00:07:21.430
it and reinstall it.

00:07:21.430 --> 00:07:22.430
All right.

00:07:22.430 --> 00:07:32.970
I'm going to top the pods and nodes so it takes two cycles to start up so if you're

00:07:32.970 --> 00:07:38.170
still on a second cycle and if it hangs then you'll have to remove it and reinstall it so

00:07:38.170 --> 00:07:44.570
it's one of the issues with metric serving yep looks good and then next we're going to top our

00:07:44.570 --> 00:07:50.890
pods this is a great way to verify if you have application pods that are consuming a lot of

00:07:50.890 --> 00:07:56.970
reason okay that worked for everyone we'll test top pods and when we top our nodes it also provides

00:07:56.970 --> 00:08:01.450
the total percent of CPU and memory that is used on that node.

00:08:01.450 --> 00:08:04.890
Okay so now we're going to make sure we have a fresh MiniCube profile.

00:08:04.890 --> 00:08:08.650
I'm going to spin up three nodes now this time with two CPUs

00:08:08.650 --> 00:08:13.450
and once it's up, kubectl get nodes, make sure we have three nodes running.

00:08:13.450 --> 00:08:17.050
It worked because we installed the metric server. If we have a metric server

00:08:17.050 --> 00:08:21.210
running we can run that command and if we do not have a metric server

00:08:21.210 --> 00:08:25.210
running then it's going to return an error. It should.

00:08:25.210 --> 00:08:30.250
yeah. The only issues I run into is if it hangs on startup. It appears the upstream team that

00:08:30.250 --> 00:08:39.530
maintains that has no issue in fixing that. I think it's just easy to fix. Yeah, if you have

00:08:39.530 --> 00:08:45.290
that issue you can just uninstall it and reinstall it so it doesn't happen every time and it takes

00:08:45.290 --> 00:08:52.730
two cycles before it starts up usually. So their point is that just wait for two cycles or

00:08:52.730 --> 00:09:01.450
reinstall all right once everyone is up let's uh need a local path storage provision remember for

00:09:01.450 --> 00:09:07.130
our persistent volumes and rancher came to the rescue and created one for minicoob so we're

00:09:07.130 --> 00:09:13.690
going to use the even though minicoob says it's not what's the error message something about not

00:09:13.690 --> 00:09:23.350
an authorized add-on or something but um that's how we get everything to work and make sure we

00:09:23.350 --> 00:09:27.510
have a storage class provider remember if we're going to store something in a volume we need a

00:09:27.510 --> 00:09:36.900
storage class we can have multiple storage classes we can have an encrypted and unencrypted if we're

00:09:36.900 --> 00:09:43.140
using longhorn for example all right so now we're going to install MongoDB we need namespace and

00:09:43.140 --> 00:09:48.500
once you've created it make sure you have that namespace and yesterday we already created our

00:09:48.500 --> 00:09:53.780
values.yaml file if you remember so if you sudo them into that make sure that you have disabled

00:09:53.780 --> 00:10:01.220
telemetry is true. Lowercase d, uppercase T maybe. I'm not sure. Once you've verified that,

00:10:01.220 --> 00:10:04.420
we're going to go ahead and install it. But this time we're going to pin it to a version,

00:10:04.420 --> 00:10:09.380
something I should have done at the very beginning. And if you weren't here this morning

00:10:09.380 --> 00:10:15.940
when I explained this, why we had issues yesterday is I had a VM where I had not done home repo

00:10:15.940 --> 00:10:22.180
update. So I was still on version seven of Mongo. And so the examples worked for version seven.

00:10:22.180 --> 00:10:31.140
The new version for the Helm chart is 1.2.1.2, so they have moved to Mongo 8, and so even

00:10:31.140 --> 00:10:35.780
though I was pulling the latest, my repo had not been updated, so it was the latest for

00:10:35.780 --> 00:10:41.760
that repo, just not for the official repo, so local repo, not the remote.

00:10:43.000 --> 00:10:48.080
So now we pin it to the version, and in this case, we're installing the operator, but pinning

00:10:48.080 --> 00:10:49.920
it to version 1.2.1.2.

00:10:49.920 --> 00:10:57.600
Again, those errors are because we're using Kubernetes 1.3.4.0 and that's one of the reasons

00:10:57.600 --> 00:11:04.400
that I did not run a .0 in production. And we'll verify the operator's running all hyphen in

00:11:04.400 --> 00:11:10.560
MongoDB. Anyone still need the command to install? Let me go back. Everyone has it installed now.

00:11:10.560 --> 00:11:17.360
Now let's verify get all hyphen in MongoDB. All right. Oh, Stanley, do you still need the command?

00:11:17.360 --> 00:11:19.680
So it looks like yours is already installed.

00:11:19.680 --> 00:11:20.800
Didn't have the version on it.

00:11:20.800 --> 00:11:21.200
Okay.

00:11:21.200 --> 00:11:28.800
Tell them uninstall Mongo operator and take off the Percona DB server and put your namespace

00:11:28.800 --> 00:11:30.640
hyphen in MongoDB.

00:11:30.640 --> 00:11:31.120
There we go.

00:11:32.000 --> 00:11:32.800
Give it a second.

00:11:33.760 --> 00:11:39.440
And then when you spin it back up, make sure you put the version in there and have the

00:11:39.440 --> 00:11:40.080
right file.

00:11:42.080 --> 00:11:45.760
Now we're going to do the same thing with our PSMDB-DB.

00:11:45.760 --> 00:11:51.280
so this is your database home values.file. Make sure that we have enabled the delete

00:11:51.280 --> 00:11:58.080
psmdb-pbc. That means when we install it, it will delete our volumes, our persistent volume claims,

00:11:58.080 --> 00:12:05.040
and our persistent volumes. I'm starting enabled false, backup enabled false, assuming you have the

00:12:05.040 --> 00:12:14.000
correct file open. I believe you all did that yesterday, so you should be good. I'll move

00:12:14.000 --> 00:12:20.160
through this to installing it with Helm. Helm install mongodb.

00:12:20.160 --> 00:12:24.320
It's calling up psmdb-db and that makes sure we have a version but this time the

00:12:24.320 --> 00:12:29.040
version is 1.2.1.1. So the operator and the database have

00:12:29.040 --> 00:12:35.040
different versions for their Helm charts. All right now

00:12:35.040 --> 00:12:40.960
get psmdb-n mongodb. It should say initializing or something

00:12:40.960 --> 00:12:48.320
similar and keep testing that it'll take it a minute or two and then do get all mongodb get

00:12:48.320 --> 00:12:55.920
pbc mongodb and get tv you can check your pods just to see if they're stuck um well you can

00:12:55.920 --> 00:13:19.000
check your pods with coupatrol get all hyphen in mongodb and see where your pods are at yep

00:13:19.000 --> 00:13:29.040
that should say ready once it is okay now let's describe the pod and we're going to grab and it

00:13:29.040 --> 00:13:34.400
should return an enable encryption this time. Mongo 8 no longer outputs all of the logs that

00:13:34.400 --> 00:13:40.800
Mongo 7 did. I guess that's how they decided to fix the continual flooding of the logs with

00:13:40.800 --> 00:13:47.600
a wired tiger log that populated it once every minute or something like that.

00:13:48.800 --> 00:13:55.760
After your MongoDB server had been up for days, it made it difficult to parse the logs manually.

00:13:55.760 --> 00:13:57.560
So they turned off a lot of the logs.

00:13:58.660 --> 00:13:59.160
Yep.

00:13:59.360 --> 00:14:00.920
I see someone has it up.

00:14:02.000 --> 00:14:06.960
See, John was able to do that around Brian.

00:14:07.000 --> 00:14:07.500
All right.

00:14:07.540 --> 00:14:12.860
Now, next we're going to check and see if we can enable a Mongo shell and

00:14:12.860 --> 00:14:17.540
query our database with show DBS.

00:14:17.540 --> 00:14:22.980
So you need to do three commands under the terminal one at a time.

00:14:22.980 --> 00:14:25.220
So we'll pop with the admin user.

00:14:25.760 --> 00:14:32.960
admin password and then we'll do kubectl run hyphen i for interactive hyphen

00:14:33.760 --> 00:14:43.840
hyphen double hyphen rm for remove when we're done and then tty and we'll use a percona client

00:14:43.840 --> 00:14:50.320
because we don't need to install the database we just need a client and our image is percona server

00:14:50.320 --> 00:14:56.800
mongo 8 and then we're not going to restart it and then that should be our string i think

00:14:56.800 --> 00:15:01.680
you might be missing the character yeah i think you're missing you have m-o-n-g-o

00:15:02.320 --> 00:15:09.040
tv user admin base64 space double hyphen decode 64

00:15:13.440 --> 00:15:18.800
oh take out the dollar sign in front of that yeah this is to show you this command line command

00:15:18.800 --> 00:15:25.680
Sorry about that, Ralph. I should have explained that. Yeah, so I do that on the terminal commands

00:15:25.680 --> 00:15:29.680
just to show that. It took me a while to find that, too, because I wasn't looking at the brief.

00:15:31.680 --> 00:15:40.240
Yeah, yeah. And then in there, you can just type show dbs. And how many databases do you see?

00:15:40.240 --> 00:15:44.000
And so there'll be a slight delay after you hit enter, and that's because it has to pull the

00:15:44.000 --> 00:15:50.240
image in and start it up and it enables the interactive terminal and then you can type

00:15:50.240 --> 00:15:57.280
show space dbs all of the databases that are available from there you can enter into the

00:15:57.280 --> 00:16:05.680
database you can look for collections etc and then ralph if you want to type show space dbs

00:16:05.680 --> 00:16:11.120
you should see three databases in there yep and then from there you can you know

00:16:11.120 --> 00:16:16.120
Enter into the database and read your collections and so forth.

00:16:16.120 --> 00:16:18.370
Type show DBS.

00:16:18.370 --> 00:16:19.370
There you go.

00:16:19.370 --> 00:16:20.370
All right.

00:16:20.370 --> 00:16:25.370
So now we're going to know that we can open a Mongo shell.

00:16:25.370 --> 00:16:27.370
Our databases are working.

00:16:27.370 --> 00:16:30.370
We're going to install a UI for Mongo.

00:16:30.370 --> 00:16:32.370
It does not have an official Helm chart.

00:16:32.370 --> 00:16:38.370
So we have this group called Cowboy Sysop.

00:16:38.370 --> 00:16:41.370
They create a lot of Helm charts.

00:16:41.370 --> 00:16:48.370
So these are system operators who got tired of not having Helm Charge, so they just decided to go ahead and create one.

00:16:48.370 --> 00:16:52.370
Here's GitHub. We're going to go ahead and I'll give you the command.

00:16:52.370 --> 00:16:54.370
We're going to add the repo. Yeah.

00:16:54.370 --> 00:16:56.370
And you control C?

00:16:56.370 --> 00:17:01.370
Yeah, and when you control C, it will automatically delete that pod that's running.

00:17:01.370 --> 00:17:07.370
And that's due to the hyphen, the double hyphen RM.

00:17:07.370 --> 00:17:12.570
so if you're spinning up a pod just to gain access you can do a double hyphen rm and when you

00:17:12.570 --> 00:17:17.690
control c out it'll automatically remove that pod from here correct yeah because otherwise

00:17:19.530 --> 00:17:23.050
saves us from having to type the second command to just delete the pod

00:17:23.050 --> 00:17:29.930
okay once your cowboy sysop is uh installed repo and we'll update our repo

00:17:29.930 --> 00:17:40.450
and list. I'll search a repo. Did you already get it? Sorry, John. I forget how this team got their name, but I guess because they

00:17:40.450 --> 00:17:57.600
cowboy it. Alright, so everyone's got that. Let's Helm repo update, Helm repo list, latest version, and we

00:17:57.600 --> 00:18:03.820
need to create a values.yaml file. So Helm show values, and then your repo, your Helm repo chart

00:18:03.820 --> 00:18:14.820
We'll find it in there, cowboy-sysop, and it should be on your Mongo Express, so mongo-express.

00:18:14.820 --> 00:18:19.000
So cowboy-sysop forward slash mongo hyphen express.

00:18:19.000 --> 00:18:27.680
So the Helm repo chart is going to be cowboy-sysop forward slash mongo hyphen express.

00:18:27.680 --> 00:18:28.680
And there we go.

00:18:28.680 --> 00:18:32.020
I see Ralph has that up.

00:18:32.020 --> 00:18:39.200
we're just outputting it to the screen first and then um yeah so just so we want to make sure

00:18:39.200 --> 00:18:44.400
command is correct so you should see a yaml file on your terminal screen and that's how we verify

00:18:44.400 --> 00:18:52.040
the command is correct and now we're going to turn this into a oh yeah it's all right it's on

00:18:52.040 --> 00:18:59.040
the next window so now it's helm show values cowboy sysop forward slash mongo hyphen express

00:18:59.040 --> 00:19:06.900
And then we're going to cap that to a mongo-exp-helm-values.yaml.

00:19:06.900 --> 00:19:10.120
And then we'll sudo vim into that, and we're going to change a few things.

00:19:10.120 --> 00:19:16.860
And we'll vim into that file, and we're going to set the service type to enable access without

00:19:16.860 --> 00:19:17.860
an ingress.

00:19:17.860 --> 00:19:22.460
So our service type will be node port instead of, I believe it says cluster IP.

00:19:22.460 --> 00:19:27.230
Lead out that cluster IP and change it to node port.

00:19:27.230 --> 00:19:28.230
Now that's it.

00:19:28.230 --> 00:19:34.070
well I make sure you have a basic off username and basic off password and not the same as off

00:19:34.070 --> 00:19:44.780
username and off password and when you're done uh helm install it with the uh in the MongoDB

00:19:44.780 --> 00:19:50.780
namespace the line number is in the bottom right corner all right and when you got those basic off

00:19:50.780 --> 00:19:57.340
username basic off password did you change the Mongo admin for the site-based url make sure you

00:19:57.340 --> 00:20:03.660
a mongo admin in there and um ralph make sure you have the forward slash at the end of it i'm sorry

00:20:03.660 --> 00:20:11.340
what was that stand uh no uh let's see home install uh home install mongo express mongo

00:20:11.340 --> 00:20:16.940
dash exp and uh i'll get to that in a second i'm just waiting on ralph to finish the password

00:20:18.620 --> 00:20:26.300
you're good okay let me um let me quickly go to here and now here's your install command

00:20:26.300 --> 00:20:43.250
view your pods. What happened? Take lunch here a minute. But under ready, where it

00:20:43.250 --> 00:20:48.390
says running, what are your numbers with the forward slash in between? Yeah, so you

00:20:48.390 --> 00:20:53.710
actually have no containers running in your pod. You have a pod, the pod says

00:20:53.710 --> 00:20:58.030
running, but 0 of 1 containers are running. And after a while I think it goes in the

00:20:58.030 --> 00:21:02.150
crash loop back off. So what happened? Well we could describe the failed pod to view

00:21:02.150 --> 00:21:07.670
the events right and you can certainly do that we're going to take lunch you can check your

00:21:07.670 --> 00:21:13.430
logs but basically what is happening is we don't have a route to our database we don't have a user

00:21:13.430 --> 00:21:19.970
with the route so that's our next step when we come back from lunch so before we leave for lunch

00:21:19.970 --> 00:21:28.180
let's go ahead and uninstall the mongo database mongo express column chart and we're going to

00:21:28.180 --> 00:21:32.340
verify that it was uninstalled and when we come back from lunch we will fix this issue we have

00:21:32.340 --> 00:21:40.060
Mongo express set up, but, um, we didn't give it a route and we did, we need to

00:21:40.060 --> 00:21:44.220
create a user or user that we created and username and password that's for the

00:21:44.220 --> 00:21:47.580
Mongo admin portal, but not for the actual Mongo.

00:21:48.060 --> 00:21:48.300
All right.

00:21:48.300 --> 00:21:51.300
So you should still have your database running, but Mongo express should be.

00:21:51.300 --> 00:21:51.540
All right.

00:21:51.540 --> 00:21:54.680
We're going to take lunch and be back in 30 minutes.

00:21:54.680 --> 00:21:58.580
So around one, uh, let's try before two o'clock on 30.

00:21:58.580 --> 00:22:13.020
So to recap what happened when we installed the UI for Mongo Admin, we don't have a route

00:22:13.020 --> 00:22:17.680
to the database, so it doesn't know where the database is, right?

00:22:17.700 --> 00:22:21.920
It needs to be able to access the database, and we could use an admin user.

00:22:21.920 --> 00:22:24.980
We use the admin user to connect to the database.

00:22:25.800 --> 00:22:30.580
But we need to create a user specifically for Mongo admin

00:22:30.580 --> 00:22:33.720
so we can read the data that's in the database.

00:22:34.040 --> 00:22:40.300
Now, in keeping with the theme that we want to automate everything that we can,

00:22:40.960 --> 00:22:41.920
we could log in.

00:22:42.300 --> 00:22:45.580
We had a command line open into the Mongo database,

00:22:45.680 --> 00:22:47.380
and we could have just created a user then.

00:22:47.380 --> 00:22:54.820
but if we're automating everything then there has to be a better way to do this right so let's

00:22:54.820 --> 00:23:02.900
automate um the means of creating a user so we're going to create a mongo express admin user

00:23:04.580 --> 00:23:15.380
and if you look in your lesson 9 folder you will see a file for mdb exp user secret

00:23:17.380 --> 00:23:23.860
Open that file and make sure it matches this one, and it should.

00:23:24.220 --> 00:23:27.560
And then once you're sure it matches, go ahead and apply.

00:23:27.620 --> 00:23:33.880
If you notice we are using plain text, we're not base64 encoding this, and

00:23:33.880 --> 00:23:37.780
that's just to make the example a little easier to work through in production.

00:23:38.220 --> 00:23:42.820
Instead of using where we have string data in front of the run.js, we would use

00:23:42.820 --> 00:23:45.460
data and we would base64 encode everything.

00:23:47.380 --> 00:24:00.500
You can see we're creating a user, mdbexpressadmin, and then we're creating a password, mdbexpressadmin123456.

00:24:00.600 --> 00:24:04.380
So it's in plain text format, so you can easily see it and read it.

00:24:06.880 --> 00:24:08.360
We have roles.

00:24:08.360 --> 00:24:16.460
For our roles, we have db-admin-any-database, user-admin, cluster-monitor, explain-role.

00:24:17.280 --> 00:24:24.940
We have read for two databases, config and local, db-admin, user-admin, read-write.

00:24:25.040 --> 00:24:29.560
All right, once you've applied that, get the secret and then describe the secret.

00:24:29.820 --> 00:24:36.540
And then we can get the secret with our hyphen O for option JSON.

00:24:36.540 --> 00:24:43.700
So, we're going to output that as an optional field for this JSON instead of YAML.

00:24:43.700 --> 00:24:49.560
When you do that, you'll notice that because we created this as string data, the password

00:24:49.560 --> 00:24:52.420
is clearly shown in the annotations for the secret.

00:24:52.420 --> 00:24:59.700
So, if you look under your metadata name, you'll see the metadata name, yep, Greek.

00:24:59.700 --> 00:25:05.700
And you can see that we already have this namespace to mongodb, so it gives you a run.js,

00:25:05.700 --> 00:25:10.340
nothing in there so you can go ahead and get the secret and output it as json

00:25:12.820 --> 00:25:18.420
make sure you have your namespace correct mongodb yeah good catch and when you output that as json

00:25:18.420 --> 00:25:26.100
you'll notice in the annotations that it clearly even though the run.js is basic c4 encoded you'll

00:25:26.100 --> 00:25:31.860
see in the annotations that it clearly lists the password in plain text so definitely not something

00:25:31.860 --> 00:25:37.140
we'd ever want to do in production. But this is an example so that you can read the password and

00:25:37.140 --> 00:25:45.720
you know that they're both the same. All right now we can create a user with a short-lived job

00:25:45.720 --> 00:25:53.640
that deletes after an hour. So we're going to create a job mdbexpuserjob.yaml. You can use

00:25:53.640 --> 00:26:02.520
the one that's in there and it looks something like this under lesson nine so it's mdbexpuserjob.yaml.

00:26:02.520 --> 00:26:08.280
It should be correct, so you should not have to change anything you're looking for.

00:26:08.280 --> 00:26:15.160
We'll go ahead and apply that, and we'll get the pod, verify that the job is completed.

00:26:16.120 --> 00:26:20.440
All right, I see completed container creating, but what does the status say?

00:26:22.120 --> 00:26:28.040
Yep, so the job, yep, so the job is completed and so we shouldn't have any containers running once

00:26:28.040 --> 00:26:33.960
it's completed okay everyone's completed you can describe the pod if you want the job will

00:26:33.960 --> 00:26:46.200
delete itself after an hour okay now we have a user so we're going to view the mongo exp values

00:26:46.200 --> 00:26:52.680
yaml file and we're going to set the mongodb url so you're going to sudo them into your mongo exp

00:26:52.680 --> 00:27:01.480
home values file and under extra env vars we're going to enable a custom mongodb url

00:27:03.080 --> 00:27:08.760
so it would look like this extra env bars we have our name and our value

00:27:11.800 --> 00:27:17.640
screenshot here what it'll look like so you'll look for extra env vars you have a colon you

00:27:17.640 --> 00:27:22.280
remove what's after the colon so you'll have like double brackets after the colon you want to make

00:27:22.280 --> 00:27:26.380
sure you remove those. This you want to make sure you type this out exactly as

00:27:26.380 --> 00:27:30.400
you see it without any mistakes otherwise it won't be able to connect to

00:27:30.400 --> 00:27:36.970
the MongoDB instance. I've provided it for you in two different formats.

00:27:36.970 --> 00:27:41.050
Hopefully you'll be able to see it clearly. And again we're using a plain

00:27:41.050 --> 00:27:47.530
text password. We would not want to do this in production. This is so you can

00:27:47.530 --> 00:27:52.030
compare. We just created a user with this password and you can see obviously it's

00:27:52.030 --> 00:27:59.770
the same password saying you know so mine is pink because my screenshot for

00:27:59.770 --> 00:28:04.690
my terminal but yours should be whatever color your term I didn't get that

00:28:04.690 --> 00:28:11.750
copied in let's see Ralph I think you still have a like a hash or something in

00:28:11.750 --> 00:28:15.790
front of you it should end up being white if you remove those two hashes and

00:28:15.790 --> 00:28:20.350
then make sure you know the comments can stay and it's an example so it has an

00:28:20.350 --> 00:28:28.190
example and it's nice when they do put examples in the values.yaml file because it's usually a

00:28:28.190 --> 00:28:36.460
tested example so what they're showing is we've tested it with this form let's see no your value

00:28:36.460 --> 00:28:46.200
is in quotes and so it'll be a different color than the name value correct yeah name and value

00:28:46.200 --> 00:28:51.600
should be the same color as the text above it and then the values for each of those will also be

00:28:51.600 --> 00:28:55.980
different colors. Oh wait, Ryan you need to, yeah Ryan you need to remove the

00:28:55.980 --> 00:28:59.320
double quotes right now you're commenting. You have two double quotes

00:28:59.320 --> 00:29:03.900
pound signs one in front of name one in front of value and you'll need to remove

00:29:03.900 --> 00:29:07.680
those and make sure your indention is correct the hyphen should be under the

00:29:07.680 --> 00:29:13.320
T. All right now we're gonna reinstall the Mongo Express Helm chart and then

00:29:13.320 --> 00:29:18.820
when that is up we will view the pods and I did a home install all right so

00:29:18.820 --> 00:29:20.820
So Cuckoo Joe, get pods.

00:29:20.920 --> 00:29:21.400
Who's failed?

00:29:21.780 --> 00:29:22.700
Why'd yours fail?

00:29:22.780 --> 00:29:25.420
Okay, so find something on line 285.

00:29:25.600 --> 00:29:29.520
See what, and everyone else can go ahead and view pods.

00:29:29.600 --> 00:29:33.500
And you should see it running within a few seconds, I would think.

00:29:33.640 --> 00:29:34.520
It would be one of one.

00:29:34.860 --> 00:29:41.700
Stanley, you might have to, might have an error in your value.

00:29:41.880 --> 00:29:43.860
Yes, those brackets need to be removed.

00:29:44.780 --> 00:29:50.330
So it should match exactly as I have it up this line.

00:29:50.330 --> 00:29:52.310
Fanny, did you remove your brackets?

00:29:52.310 --> 00:29:53.930
Yeah, but imagine it's your value.

00:29:53.930 --> 00:29:58.610
You may need to move your, your hyphens should be under the T in front of name.

00:29:59.810 --> 00:30:03.710
Then the Ralph looks like is yours running fine, but it's still running one of one.

00:30:03.710 --> 00:30:03.890
Yep.

00:30:03.890 --> 00:30:04.390
You're good.

00:30:05.730 --> 00:30:10.250
So we're just waiting on one more individual and you'll have to uninstall

00:30:10.250 --> 00:30:14.750
it and then reinstall it if you're running into it, right?

00:30:15.010 --> 00:30:15.290
Yep.

00:30:15.290 --> 00:30:17.370
So it's going to, yeah, 3,600.

00:30:17.370 --> 00:30:21.870
And I do that so that all of the logs and events are collected.

00:30:23.330 --> 00:30:26.110
And so that way, if they're shipped out and when it's deleted,

00:30:26.350 --> 00:30:27.610
make sure we have all of the logs.

00:30:27.730 --> 00:30:29.090
But I set it to 15 minutes.

00:30:30.890 --> 00:30:34.590
So what we're doing is enabling metrics for Mongo.

00:30:35.590 --> 00:30:38.570
And so enabling, well, we're not to the metrics quite yet,

00:30:38.570 --> 00:30:42.150
but we're enabling a user in the credentials for metrics.

00:30:42.430 --> 00:30:46.550
And then at the same time, we're providing the string

00:30:46.550 --> 00:30:49.390
so that we can access our MongoDB from our admin port.

00:30:49.470 --> 00:30:50.570
And here's where it can now stand.

00:30:50.650 --> 00:30:52.550
Okay, let's go on to the next piece.

00:30:53.450 --> 00:30:56.510
And you can get your pods, describe your pods,

00:30:56.610 --> 00:30:57.310
should all be working.

00:30:57.430 --> 00:30:59.890
We need to access Mongo Express in the browser.

00:31:00.670 --> 00:31:02.290
So we need to obtain a node port.

00:31:02.470 --> 00:31:05.630
Remember, we enabled node port instead of cluster IP

00:31:05.630 --> 00:31:07.390
in the values.yaml file, right?

00:31:08.090 --> 00:31:11.130
So we need our node port in the Mongo Express service.

00:31:11.130 --> 00:31:15.990
So kubectl get service, hyphen in, and then the namespace.

00:31:15.990 --> 00:31:18.950
So we're going to look for the node port and the node port is how many?

00:31:18.950 --> 00:31:19.950
Five.

00:31:19.950 --> 00:31:26.720
And so the node port would be, it looks like everyone's is different, but you'll want that

00:31:26.720 --> 00:31:27.720
node port.

00:31:27.720 --> 00:31:31.800
And then remember type minicube IP to get your IP address.

00:31:31.800 --> 00:31:39.360
So your string would be your minicube IP, your colon, your node port, HTTP for that.

00:31:39.360 --> 00:31:45.660
So it's going to be HTTP minicube IP colon node port forward slash Mongo admin forward

00:31:45.660 --> 00:31:46.660
slash.

00:31:46.660 --> 00:31:52.120
Because remember, we set a site URL of forward slash mongoadmin forward slash.

00:31:52.280 --> 00:31:54.740
So instead of root, it's mongoadmin.

00:31:54.760 --> 00:32:01.960
Yeah, and so it's going to ask you for a username and password.

00:32:03.860 --> 00:32:10.120
And that is, I believe, server and password.

00:32:10.820 --> 00:32:12.660
Yeah, really, really complex.

00:32:13.540 --> 00:32:14.520
There you go.

00:32:14.520 --> 00:32:17.160
There's your MongoDB admin UI.

00:32:17.420 --> 00:32:19.220
Now, of course, this isn't production ready

00:32:19.220 --> 00:32:20.780
because we exposed our credentials

00:32:20.780 --> 00:32:23.920
to make this easier to understand what's going on,

00:32:24.000 --> 00:32:27.160
but we want to mask those credentials.

00:32:27.160 --> 00:32:28.500
Our username is server.

00:32:28.860 --> 00:32:30.280
Password. Password is password.

00:32:30.380 --> 00:32:32.600
All right, everyone's got a Mongo Express,

00:32:33.360 --> 00:32:37.360
and you can play around with MongoDB now in Kubernetes.

00:32:37.700 --> 00:32:38.680
Yeah, kind of fun, huh?

00:32:38.760 --> 00:32:39.900
I like MongoDB.

00:32:40.700 --> 00:32:43.000
I've been using it for several years now,

00:32:43.000 --> 00:32:48.820
So I do enforce a schema when I use MongoDB, but it does allow me to add.

00:32:48.860 --> 00:32:53.620
So if I have a project where I'm adding a lot of data over time and adding fields,

00:32:55.420 --> 00:32:59.380
only when I write new data, I enforce the schema and then I just handle any

00:32:59.380 --> 00:33:02.400
errors if I'm returning a null value.

00:33:02.400 --> 00:33:07.120
So once you get used to working with a document database, it's actually pretty

00:33:07.120 --> 00:33:07.660
nice.

00:33:08.260 --> 00:33:09.220
Okay.

00:33:09.460 --> 00:33:10.240
Next.

00:33:11.120 --> 00:33:15.120
couprom stack you all understand how to do this we'll leave that up and running leave

00:33:15.120 --> 00:33:19.920
a browser up and let's deploy the couprom stack chart i'm going to teach you a new

00:33:19.920 --> 00:33:26.880
way to deploy with helm with this okay so and this contains multiple sub charts

00:33:27.440 --> 00:33:33.520
so normally we would not do multiple sub charts together but this one actually works fairly well

00:33:33.520 --> 00:33:40.480
and it does take some work though to get this to work with the declarative

00:33:40.480 --> 00:33:45.220
GitOps. Generally we don't want to use all-on-one Helm charts with declarative

00:33:45.220 --> 00:33:52.600
GitOps. So we use a Prometheus community Helm chart and I'll give you the command

00:33:52.600 --> 00:33:59.080
it's just helm repo add and of course helm repo update, helm repo list, helm

00:33:59.080 --> 00:34:05.240
search repo, and then the name of the coupon stack so that when it got added, it looks like

00:34:05.240 --> 00:34:12.360
it wouldn't have added it. So helm repo update, helm repo list, and then verify the latest version,

00:34:12.360 --> 00:34:18.120
helm search repo. It'll give us the latest version. And next we're going to create a

00:34:18.120 --> 00:34:25.890
namespace for our monitoring, and we'll just call it monitor. Did I get that wrong? There we go.

00:34:25.890 --> 00:34:31.590
Okay, Helm Search Repo and then the name for Prometheus. I think it's going to be

00:34:31.590 --> 00:34:35.030
Prometheus Community, but there might be something between Prometheus and

00:34:35.030 --> 00:34:43.000
Community. Probably a hyphen. And then pull up your versions, thinking about the

00:34:43.000 --> 00:34:49.640
versions of, but waiting on Ryan. Hey Ryan, have you run Helm Search Repo? You might be able to tab

00:34:49.640 --> 00:34:55.060
in autocomplete once you start typing Prometheus. No? Okay, now let's go to

00:34:55.060 --> 00:35:01.140
namespace we're gonna have kubectl create namespace monitoring make sure we have that namespace all

00:35:01.140 --> 00:35:07.060
right and it's got that now let's show our values for our helm repo chart so you're going to look

00:35:07.060 --> 00:35:12.900
for kubeprom stack so it's going to be a Prometheus community and if you scroll up

00:35:14.260 --> 00:35:20.500
i think it's going to start with a k so if you scroll up and look for kubeprom stack

00:35:20.500 --> 00:35:27.500
That's probably it. It should be K-U-B-E hyphen Prometheus hyphen stack. Yep.

00:35:27.500 --> 00:35:33.580
So we're going to do, yep, so we're going to do, yep, and so we're going to do,

00:35:33.580 --> 00:35:37.780
that's a chart version, and so we're going to do home show values and then that whole

00:35:37.780 --> 00:35:44.840
string Prometheus hyphen community forward slash coop Prometheus stack. Make sure we

00:35:44.840 --> 00:35:52.680
the values output to our terminal yep i see one two three and one typo okay now we're going to

00:35:52.680 --> 00:35:59.160
turn it into a values.yaml file same command but then add the cat we're going to cat it to

00:35:59.160 --> 00:36:04.440
kubeprompstack helm values dot and once that is done we'll sudo vim in and you can see this is

00:36:04.440 --> 00:36:10.280
the full values.yaml file i think it's something like crazy number of lines there you go yeah

00:36:10.280 --> 00:36:16.600
that's a crazy number of lines. Started out at 3,000. That's 5,000 now. So, and that's just in,

00:36:16.600 --> 00:36:23.720
you know, two year job security. There is probably no one on that team that knows what every value

00:36:23.720 --> 00:36:37.250
is. It's a different method. So we're going to do helm install. We're going to call it monitoring.

00:36:37.970 --> 00:36:43.170
We're going to use the namespace of monitoring. Now after each backslash, there's no space,

00:36:43.170 --> 00:36:51.970
just so you know. So home install monitoring, just type it exactly as you see it and hit enter.

00:37:29.270 --> 00:37:36.390
Who was that? Who? And what happened? Something's got a missing character probably.

00:37:37.990 --> 00:37:43.270
Where's the first error start at? At last argument, unexpected arguments,

00:37:43.270 --> 00:37:50.550
Grafana enabled true. Okay, so alert manager enabled true. It's not saying that one though,

00:37:50.550 --> 00:37:55.270
right? So there's probably an error on that line. There's either an error on that line or an error

00:37:55.270 --> 00:38:03.560
on the next one. John, yours completed correctly. Stanley, yours completed correctly. And again,

00:38:03.560 --> 00:38:13.680
those Kubernetes 1.34.0 errors, which were fixed in 1.34.0. Oh, you left the E off. Just put an E

00:38:13.680 --> 00:38:28.900
in there and hit in. Huh? Oh no, for route. There you go, route. Take all those spaces out of there.

00:38:28.900 --> 00:38:33.540
yeah take that take that backslash out right oh you have the carrots in there that's the problem

00:38:33.540 --> 00:38:37.780
take the carrots out make sure you only have one space in between each of the set commands yeah

00:38:37.780 --> 00:38:41.860
that was a problem you were copying the carrot whatever those tens are you're not here they

00:38:41.860 --> 00:38:51.830
greater than or equal see them success all right on the next one all right so we can get pods we

00:38:51.830 --> 00:38:58.710
can describe our pods um it should be up and running okay we still got a few coming up take

00:38:58.710 --> 00:39:06.550
it a second it's doing a lot behind the scenes here that's not even highly available it's just

00:39:06.550 --> 00:39:11.910
an all-in-one there we go all right everyone else should be running now let's create let's see

00:39:11.910 --> 00:39:17.830
we're going to create a simplified values.yaml file so before we were using helm show values

00:39:17.830 --> 00:39:26.630
remember but now once we have something running if we want to cat our values.yaml running we can

00:39:26.630 --> 00:39:32.950
had it based on what we've changed so if we've modified anything from the main values.yml file

00:39:32.950 --> 00:39:39.590
it will provide a simplified values.yml file but we use git instead of show so helm git values

00:39:39.590 --> 00:39:46.470
monitoring hyphen in monitoring so the name of the helm install is monitoring our namespace is

00:39:46.470 --> 00:39:53.590
monitoring we're going to cap that to kubeprom stack 2 because we already took up kubeprom stack

00:39:53.590 --> 00:40:01.190
So kubectl stack to helm values.yaml. And then when we view that, you'll see it's a very abbreviated

00:40:01.190 --> 00:40:08.230
values.yaml file versus what we had before. Now we want to modify that to match what you see on

00:40:08.230 --> 00:40:13.990
the right. So make sure that what you did matches what is on the right. Yep. So you want to add to

00:40:13.990 --> 00:40:19.830
it. So what I did was I gave you an easier way. So this is an easier way to go in and modify your

00:40:19.830 --> 00:40:24.010
values that yaml file instead of going through five how many lines did you say that was

00:40:24.010 --> 00:40:30.650
five thousand three hundred or something yeah instead of having to parse all of that let's

00:40:30.650 --> 00:40:34.930
i mean let's no one wants it to be i prefer it easy uh you can do it however you want just take

00:40:34.930 --> 00:40:41.050
out the user supply values so yeah alert manager is usually listed first you want to try to keep

00:40:41.050 --> 00:40:48.370
it in the same order as the values that yaml file some of them um will complain and reject it

00:40:48.370 --> 00:40:56.290
like the worst that i've ever seen on the slightest silliest errors um it will fail to

00:40:56.290 --> 00:41:03.650
utilize the rest of the values.yaml after that point that's longhorn longhorn rejects the rest

00:41:03.650 --> 00:41:09.130
of your values.yaml file some of them it will work some it will not and of course when longhorn

00:41:09.130 --> 00:41:13.950
rejects it there's no error message or anything like that you just have a board to install so

00:41:13.950 --> 00:41:23.110
you know yes well i think cowboy sysops is just those guys wanted helm charts and a lot of the

00:41:23.110 --> 00:41:29.250
upstream teams did not have helm captains and so they got tired of waiting and they wanted to run

00:41:29.250 --> 00:41:34.570
it on kubernetes so these built their own helm charts and so i think that's where their name

00:41:34.570 --> 00:41:41.290
came from as they cowboyed it so i'm from the midwest right so i'm from the midwest so we call

00:41:41.290 --> 00:41:49.690
at cowboying it so but yeah there you go and and uh so they got tired of waiting on helm charts so

00:41:49.690 --> 00:41:54.550
rather than waiting for the official helm release they decided to cowboy and create their own helm

00:41:54.550 --> 00:42:00.490
charts so and i've done that for many years as well all right everyone getting close stanley's

00:42:00.490 --> 00:42:06.570
already done all right so now we have to uninstall so is everybody done okay so now we have to

00:42:06.570 --> 00:42:12.010
uninstall monitoring so it's going to be helm uninstall monitoring hyphen and monitoring and

00:42:12.010 --> 00:42:18.250
we'll make sure that it was uninstalled all right so now we're going to install it and remember

00:42:18.250 --> 00:42:23.690
we're using the the helm chart 2 so remember we have the number two so you're going to do

00:42:23.690 --> 00:42:29.210
helm install your name of monitoring your chart name which is prometheus community

00:42:30.170 --> 00:42:36.090
prometheus stack and then your file name which has the number two in it and then your namespace

00:42:36.090 --> 00:42:41.690
of monitoring. I don't, we have not, I don't think we've used this command, so I don't think it'll be

00:42:41.690 --> 00:42:49.930
here. I'll install monitoring and then our chart name is prometheus-community

00:42:50.570 --> 00:42:58.090
forward slash kube k-u-b-e hyphen prometheus hyphen stack and then the

00:42:58.090 --> 00:43:07.990
the file name it's yeah Prometheus community forward slash kube k-u-b-e hyphen Prometheus

00:43:07.990 --> 00:43:11.830
hyphen stack and then for the file name does anyone have the file name

00:43:11.830 --> 00:43:17.990
is it prom stack two helm values dot yaml and then the namespace is monitoring

00:43:17.990 --> 00:43:25.970
yeah because the regular prom stack is just the generic yaml so that's the full 5000 lines and

00:43:25.970 --> 00:43:33.490
go ahead and get your pods and describe your pods yeah that's that's the kubeprometheus stack two

00:43:33.490 --> 00:43:42.210
is um no there shouldn't be a number two after that so it should be a kubeprometheus stack

00:43:43.250 --> 00:43:49.170
so kubeprometheus stack and then for your file you're going to have a hyphen f for your file

00:43:49.170 --> 00:43:53.410
yeah you want to uninstall it so as soon as it finishes here you want to uninstall it

00:43:53.410 --> 00:44:00.470
and go ahead and helm uninstall monitoring hyphen in monitoring okay go ahead and uninstall it hit

00:44:00.470 --> 00:44:12.310
uninstall there we go and now for your install command it's going to be helm install and then

00:44:12.310 --> 00:44:21.930
prometheus community forward slash kube prometheus stack and then you're going to do hyphen f and

00:44:21.930 --> 00:44:25.810
And then your name of your YAML file that you created with the number two in it.

00:44:25.810 --> 00:44:30.290
Do you remember the name of that dot YAML and then hyphen in monitoring, and this should

00:44:30.290 --> 00:44:31.790
create the proper node ports.

00:44:31.790 --> 00:44:32.790
All right.

00:44:32.790 --> 00:44:37.030
And then we're going to access and log into Grafana and then go ahead and get your pods

00:44:37.030 --> 00:44:40.810
to your up and running for monitoring let's looks everything running.

00:44:40.810 --> 00:44:41.810
Yep.

00:44:41.810 --> 00:44:42.810
All right.

00:44:42.810 --> 00:44:45.410
So now access and login to the Grafana UI.

00:44:45.410 --> 00:44:46.910
We need mini kube IP.

00:44:46.910 --> 00:44:47.910
We need our node ports.

00:44:47.910 --> 00:44:50.690
So, so to get the node ports, how do we get those?

00:44:50.690 --> 00:44:55.690
you can do kubectl get sbc-n monitor.

00:44:55.690 --> 00:44:58.590
So we have node ports now present.

00:44:58.590 --> 00:45:01.430
If you notice, we have a node port for Grafana.

00:45:01.430 --> 00:45:05.510
We have one for, what's the next one?

00:45:06.610 --> 00:45:08.230
Alert manager.

00:45:08.230 --> 00:45:13.090
And then we have one for Prometheus, right?

00:45:13.090 --> 00:45:15.410
All right, and those are the three we're gonna need.

00:45:15.410 --> 00:45:17.950
So, and then we'll need our username and password.

00:45:17.950 --> 00:45:19.950
So now let's work through this.

00:45:20.690 --> 00:45:28.990
So, the node port is kubectl get-sbc-n monitoring.

00:45:28.990 --> 00:45:31.910
And so we're going to look for the node port for Grafana.

00:45:31.910 --> 00:45:37.910
So find the node port for Grafana, and it'll be the first one listed, which is pretty different

00:45:37.910 --> 00:45:38.910
for each of you.

00:45:38.910 --> 00:45:45.190
And so you'll do HTTP in the browser, and then you're going to have your Minikube IP,

00:45:45.190 --> 00:45:48.130
your colon, and your node port.

00:45:48.130 --> 00:45:51.770
So, Stanley, you don't have any node ports.

00:45:51.950 --> 00:45:55.250
You might have to uninstall and reinstall with your 2.

00:45:55.470 --> 00:45:58.130
So you might have installed accidentally without the number 2.

00:45:58.190 --> 00:46:00.250
Where's your other node ports?

00:46:01.670 --> 00:46:04.130
See, we should have a bunch of node ports in there.

00:46:04.230 --> 00:46:05.570
I think those are missing on yours.

00:46:07.650 --> 00:46:12.230
Okay, so everyone else do your Minifoop IP, your node port.

00:46:13.370 --> 00:46:18.730
And then a second will help you with the username and password.

00:46:18.730 --> 00:46:23.490
unless you can figure it out. The username is admin. I'll see if you can

00:46:23.490 --> 00:46:26.590
figure out, since you're ahead of the rest of us, I'll see if you can figure out what the

00:46:26.590 --> 00:46:31.630
password is. If you want to sudo vim into your kubeprom stack 2 Helm values,

00:46:31.630 --> 00:46:37.990
Stanley, I'll put this back up on the screen. So we have multiple node ports. We

00:46:37.990 --> 00:46:43.870
have alert manager as a service type node port. Grafana has a service type node

00:46:43.870 --> 00:46:50.750
port and then Prometheus has a service type and then for your Prometheus you'll need to move that

00:46:50.750 --> 00:46:56.990
over two spaces so go down to service and move your service to the left two spaces and then with

00:46:56.990 --> 00:47:04.190
that move the type to the left two spaces to the left end there you go okay so now and you'll need

00:47:04.190 --> 00:47:11.250
to uninstall the kubeprom stack and go ahead and reinstall and then that should give you your node

00:47:11.250 --> 00:47:16.050
ports now instead of everything saying cluster ip we should have three that say node port in it

00:47:16.770 --> 00:47:25.410
all right has anyone figured out how to um get the password i don't want to take it what

00:47:27.810 --> 00:47:36.770
uh i don't believe so let's see here yeah let's see here i'm gonna go back okay so
