Add delete cluster

This commit is contained in:
ChristopherHX
2026-03-18 21:20:54 +00:00
parent d24696be8c
commit 7db5906c08

View File

@ -20,6 +20,8 @@ jobs:
- name: Create kind cluster - name: Create kind cluster
run: | run: |
echo "Try to Delete old cluster"
kind delete cluster --name test-cluster || echo "No cluster Deleted"
kind create cluster --name test-cluster --wait 5m kind create cluster --name test-cluster --wait 5m
- name: Connect kind to the job container's network and fix kubeconfig - name: Connect kind to the job container's network and fix kubeconfig
@ -59,3 +61,7 @@ jobs:
kubectl cluster-info kubectl cluster-info
kubectl get nodes kubectl get nodes
kubectl get pods -A kubectl get pods -A
- name: Delete Cluster
if: always()
run: kind delete cluster --name test-cluster