another attempt

This commit is contained in:
ChristopherHX
2026-03-18 21:46:02 +00:00
parent 1c8e4d9ef6
commit 2325970518

View File

@ -18,10 +18,15 @@ jobs:
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
install kubectl /usr/local/bin/
- name: Cleanup any previous kind cluster (best-effort)
if: always()
run: |
kind delete cluster --name test-cluster || true
docker ps -a --filter "name=test-cluster" -q | xargs -r docker rm -f || true
docker network ls --filter "name=kind" -q | xargs -r docker network rm || true
- name: Create kind cluster
run: |
echo "Try to Delete old cluster"
kind delete cluster --name test-cluster || echo "No cluster Deleted"
kind create cluster --name test-cluster
- name: Attach kind control-plane to job network and wait
@ -58,6 +63,9 @@ jobs:
kubectl get nodes
kubectl get pods -A
- name: Delete Cluster
- name: Cleanup kind cluster (best-effort)
if: always()
run: kind delete cluster --name test-cluster
run: |
kind delete cluster --name test-cluster || true
docker ps -a --filter "name=test-cluster" -q | xargs -r docker rm -f || true
docker network ls --filter "name=kind" -q | xargs -r docker network rm || true