Skip to content

GKE Cluster Shut Down #2

GKE Cluster Shut Down

GKE Cluster Shut Down #2

name: GKE Cluster Shut Down
on:
workflow_dispatch:
jobs:
cluster:
runs-on: ubuntu-latest
steps:
- name: Authenticate into gcloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS }}
- name: Install gcloud CLI
uses: google-github-actions/[email protected]
- name: Install gcloud k8s auto component
run: gcloud components install gke-gcloud-auth-plugin
- name: Shut Down GKE Cluster
run:
gcloud container clusters delete "pt-${{ vars.GCP_CLUSTER_MACHINE_TYPE }}" \
--region "${{ vars.GCP_CLUSTER_LOCATION }}" \
--project "${{ secrets.GCP_PROJECT }}"