From 6f8fa4c9dc526cccd896fae8caabe64a9d21e0d0 Mon Sep 17 00:00:00 2001 From: John Kenyon Date: Tue, 24 Jun 2025 08:07:34 -0700 Subject: [PATCH] add more commands for k3d --- hello-k3d/Makefile | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/hello-k3d/Makefile b/hello-k3d/Makefile index 1882d0c..8f21def 100644 --- a/hello-k3d/Makefile +++ b/hello-k3d/Makefile @@ -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