Our great static website is broken. Please fix it. 🙏😺
The application is a Nginx server hosted on Kubernetes. You need to set up the Kubernetes "cluster" using k3s and Docker Compose.
-
Build the Docker images:
docker compose build
-
Start the K3S containers:
docker compose up -d
-
Add an entry to your hosts file to route traffic inside the local Kubernetes cluster:
echo "127.0.0.1 test-domain.local" | sudo tee -a /etc/hosts
-
Access the running container:
docker compose exec k3s-server sh -
Apply the Kubernetes manifests using Kustomize inside the container:
kubectl apply -k ./manifests/
You can modify files in the
manifestsdirectory and reapply them using the command above.
To verify that the website is functioning correctly, execute the following command on your host machine:
curl http://test-domain.local/fooThis should return the main page of the great website.