Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simenandre/setup-gke-gcloud-auth-plugin
Installs a pre-requisite for "gcloud container clusters get-credentials" command with a modern k8s client.
https://github.com/simenandre/setup-gke-gcloud-auth-plugin
actions github-actions gke google
Last synced: 22 days ago
JSON representation
Installs a pre-requisite for "gcloud container clusters get-credentials" command with a modern k8s client.
- Host: GitHub
- URL: https://github.com/simenandre/setup-gke-gcloud-auth-plugin
- Owner: simenandre
- License: apache-2.0
- Created: 2023-04-07T17:19:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-25T06:47:06.000Z (7 months ago)
- Last Synced: 2024-05-28T17:14:58.548Z (6 months ago)
- Topics: actions, github-actions, gke, google
- Homepage:
- Size: 17.6 KB
- Stars: 2
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `simenandre/setup-gke-gcloud-auth-plugin`
## ⚠️ This plugin is deprecated. See the [migration guide](#migration-guide-to-google-github-actionsget-gke-credentialsv2) for how to achieve the same using Google's own github action
This GitHub Actions installs a pre-requisite for "gcloud container clusters get-credentials"
command with a modern k8s client.## Quickstart
```yaml
- uses: simenandre/setup-gke-gcloud-auth-plugin@v1
```### Example
```yaml
name: On Pushpermissions:
id-token: write
contents: readon:
push:
branches:
- mainjobs:
apply-changes:
steps:
- name: Checkout
uses: actions/checkout@v3- name: Authenticate to GCP
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GOOGLE_PROJECT_SA_KEY }}
project_id: ${{ secrets.GOOGLE_PROJECT_ID }}- uses: simenandre/setup-gke-gcloud-auth-plugin@v1
- uses: google-github-actions/get-gke-credentials@v1
with:
cluster_name: my-cluster
location: us-central1-a# At this point you should be able to communicate with your cluster
- run: kubectl get pods
```### Migration guide to [google-github-actions/get-gke-credentials@v2](https://github.com/google-github-actions/get-gke-credentials)
Assuming this is your current setup using this plugin:
```yaml
- name: Authenticate to Google
uses: "google-github-actions/auth@v1"
with:
credentials_json: "${{ secrets.GCP_SERVICEACCOUNT_KEY }}"- uses: simenandre/setup-gke-gcloud-auth-plugin@v1
- name: Authenticate to GKE cluster
uses: google-github-actions/get-gke-credentials@v1
with:
cluster_name: my_cluster
location: europe-west1-b
```Migrating to get-gke-credentials can be done like so:
```yaml
- name: Authenticate to Google
uses: "google-github-actions/auth@v2"
with:
credentials_json: "${{ secrets.GCP_SERVICEACCOUNT_KEY }}"- uses: "google-github-actions/setup-gcloud@v2"
with:
install_components: "gke-gcloud-auth-plugin"- name: Authenticate to GKE cluster
uses: google-github-actions/get-gke-credentials@v2
with:
cluster_name: my_cluster
location: europe-west1-b
```