homepage/k3d
shamoon 19c25713c4 Run pre-commit hooks over existing codebase
Co-Authored-By: Ben Phelps <ben@phelps.io>
2023-10-18 09:49:33 -07:00
..
.envrc added k3d test scripts 2023-01-11 09:47:34 -06:00
.gitignore Run pre-commit hooks over existing codebase 2023-10-18 09:49:33 -07:00
README.md Run pre-commit hooks over existing codebase 2023-10-18 09:49:33 -07:00
Tiltfile Issue with dotnext PVC preventing normal deployments 2023-01-18 10:05:12 -06:00
k3d-deploy.sh Issue with dotnext PVC preventing normal deployments 2023-01-18 10:05:12 -06:00
k3d-down.sh added k3d test scripts 2023-01-11 09:47:34 -06:00
k3d-helm-values.yaml Issue with dotnext PVC preventing normal deployments 2023-01-18 10:05:12 -06:00
k3d-up.sh Issue with dotnext PVC preventing normal deployments 2023-01-18 10:05:12 -06:00
k3d.yaml Fix k3d memory specification 2023-09-18 14:35:42 -07:00

README.md

Kubernetes Development

These configs and scripts attempt to simplify spinning up a kubernetes cluster for development and testing purposes. It leverages k3d to create a k3s cluster in Docker. Homepage can then be deployed either via the k3d-deploy.sh script, or tilt can be used to spin up a local CI loop that will automatically update the deployment.

All the commands in the document should be run from the k3d directory.

Requisite Tools

Tool Description
docker Docker container runtime
kubectl Kubernetes CLI
helm Kubernetes package manager
k3d Kubernetes on Docker - used to create the cluster
k9s (Optional) Command line view for kubernetes cluster
tilt (Optional) Local CI loop for kubernetes deployment
direnv (Optional) Automatically loads kubeconfig via .envrc

One-off Test Deployments

Create a cluster:

./k3d-up.sh

Build and deploy:

./k3d-deploy.sh

Open the Homepage deployment:

xdg-open http://homepage.k3d.localhost:8080/

Continuous Deployment

Create a cluster:

./k3d-up.sh

Kick off tilt:

tilt up

Press space bar to open the tilt web UI, which is quite informative.

Finally, open the Homepage deployment:

xdg-open http://homepage.k3d.localhost:8080/