0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
No active XP Potion
Accept a Quest
Login to submit answers
You've been hired by SynergyChat! SynergyChat is a metaverse-enabled chat app that provides data-driven insights through cutting-edge AI models that run on Web 3 infrastructure. It's truly the pinnacle of Silicon Valley innovation and culture.
All that to say, it's like Discord but with extra features for businesses.
For the rest of this course, we'll be deploying SynergyChat web services to Kubernetes!
The kubectl create deployment
command will create a "deployment" for us. We'll talk more about the nuances of "deployments" later. But to put it simply, we only need to provide two things:
kubectl create deployment synergychat-web --image=docker.io/bootdotdev/synergychat-web:latest
This command will deploy a container built from this Docker image to your local k8s cluster.
To make sure the deployment was successful, run:
kubectl get deployments
By default, resources inside of Kubernetes run on a private, isolated network. They're visible to other resources within the cluster, but not to the outside world.
In order to access the application from your local network, you'll need to use kubectl
to do some port forwarding. First, run:
kubectl get pods
We'll talk more about pods later, but for now, a pod is an abstraction over a container, and remember, a container is just a running instance of an image. To oversimplify, a pod is a running application.
You should see something like this:
NAME READY STATUS RESTARTS AGE
synergychat-web-679cbcc6cd-cq6vx 1/1 Running 0 20m
Next, run:
kubectl port-forward PODNAME 8080:8080
Be sure to replace PODNAME
with your pod's name. In my case, it was synergychat-web-679cbcc6cd-cq6vx
.
Next, open your browser and navigate to http://localhost:8080
. You should see a webpage titled "SynergyChat"! Keep in mind, that we haven't configured all the resources the page needs yet, so the forms won't work, but the page should load.
Run and submit the CLI tests.
The Boot.dev CLI requires you to be signed in to submit your solution!
Copy/paste one of the following commands into your terminal:
Run
bootdev run 56b45923-3c78-42e7-a601-e0834206983d
Submit
bootdev run 56b45923-3c78-42e7-a601-e0834206983d -s
bootdev config base_url <url>
Run the CLI commands to test your solution.
Using the Bootdev CLI
The Bootdev CLI is the only way to submit your solution for this type of lesson. We need to be able to run commands in your environment to verify your solution.
You can install it here. It's a Go program hosted on GitHub, so you'll need Go installed as well. Instructions are on the GitHub page.