add more commands for k3d

main
John Kenyon 2025-06-24 08:07:34 -07:00
parent d5bae5f9da
commit 6f8fa4c9dc
1 changed files with 13 additions and 5 deletions

View File

@ -1,28 +1,36 @@
all: cluster image load apply restart watch
all: cluster image load apply restart check
# TODO: maybe background this?
cluster:
k3d cluster create mycluster
k3d cluster create mycluster --port "8080:80@loadbalancer" --port "8443:443@loadbalancer"
kubectl label node k3d-mycluster-server-0 ingress-ready=true
k3d cluster list
image: Dockerfile
docker build -t shoppinglist-frontend:latest .
# TODO: This is not working on my system
load:
k3d image import shoppinglist-frontend:latest -c mycluster
#docker save shoppinglist-frontend:latest -o shoppinglist-frontend.tar
#k3d image import ./shoppinglist-frontend.tar -c mycluster
apply:
kubectl apply -f k8s/
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.10.0/deploy/static/provider/kind/deploy.yaml
restart:
kubectl delete pod -l app=shoppinglist-frontend
check:
kubectl get pods
kubectl get pods -n ingress-nginx
watch:
kubectl get pods -l app=shoppinglist-frontend -w
clobber:
k3d cluster delete mycluster