This tutorial demonstrates how to set up a MongoDB Atlas database and securely inject the connection URI into Kubernetes pods using secrets. It covers the sign-up process, cluster configuration, secret creation, and modifying deployment YAML files to manage environment variables.
Length 7:01
Captions English (Generated), Spanish (Auto-translated), French (Auto-translated), Korean (Auto-translated), Portuguese (Auto-translated), Vietnamese (Auto-translated) #mongodb #atlas #kubernetes #secrets #deployment #database #cloud #infrastructure #tutorial #devops
0:01 Okay, so the first environment variable we're 0:03 gonna handle is 0:04 providing a MongoDB URI, and we're gonna take 0:08 advantage of MongoDB Atlas as a managed service 0:12 to run MongoDB for us, and then we can connect to it in 0:16 both our local and gcloud Kubernetes cluster. 0:20 The reason for this is because it's totally free to start out, 0:23 and we don't need 0:24 to set up any complicated infrastructure, and Atlas makes 0:28 it super easy to just get started with what we need out of the box, and they 0:32 also provide auto-scaling so that our MongoDB 0:36 infrastructure will grow and scale as more load hits our 0:40 system, which is a great feature to have. 0:43 So make sure you head to 0:44 mongodb.com/cloud/atlas/register. 0:49 Go ahead and sign up for Atlas. It's completely free to get up and 0:53 running, and we will get a MongoDB set up. 0:56 So after you've created your account, you should see that you get a message to 0:59 verify your email. Go ahead and verify your email. 1:03 After our email is verified, we'll go ahead and click Continue to move 1:06 on 1:07 with the process. You can go ahead and complete out this quick form 1:11 to tell them what kind of app we are building. 1:14 You can just fill this out with whatever you'd like. 1:17 And we can set our preferred language to JavaScript here. 1:20 Go ahead and click Finish. Now we can go ahead 1:23 and select the kind of database 1:24 we wanna deploy. You can see the three types here, 1:27 a dedicated 1:28 cluster, a serverless cluster that will auto-scale based on our 1:32 needs, and a free cluster that uses a shared environment. 1:36 We are gonna choose the free environment so we can continue to build. 1:40 You can always upgrade later on if you think you need more compute power. 1:44 You can then choose any provider. I'll go ahead and use Google Cloud
The rest of the transcript is for members.
Sign in