Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tonglil/auth-gke

Get the credentials for the GKE cluster using a GCP service account JSON credential
https://github.com/tonglil/auth-gke

drone drone-plugin gcloud gcloud-sdk gcp gke google-cloud google-cloud-platform kubernetes

Last synced: about 1 month ago
JSON representation

Get the credentials for the GKE cluster using a GCP service account JSON credential

Awesome Lists containing this project

README

        

# auth-gke

Get the credentials for the GKE cluster using a GCP service account JSON credential.

Based on https://github.com/tonglil/auth-gcloud.

## Usage

```sh
docker run \
-e TOKEN="$(cat service-account.json)" \
-e PROJECT=my-project \
-e LOCATION=us-central1-b \
-e CLUSTER=my-cluster \
tonglil/auth-gke
```

## Example

### Drone 1+

```yml
pipeline:
gke-actions:
image: tonglil/auth-gke
environment:
PROJECT: my-project
LOCATION: us-central1-b # zone or region
CLUSTER: my-cluster
commands:
- auth-gke
- kubectl ...
secrets: [google_credentials]
```

### Drone 0.5+

Expand

```yml
steps:
- name: gke-actions
image: tonglil/auth-gke
environment:
PROJECT: my-project
LOCATION: us-central1-b # zone or region
CLUSTER: my-cluster
TOKEN:
from_secret: google_credentials
commands:
- auth-gke
- kubectl ...
```

## Releasing

Use the base image's `gcloud` version number as the tag:

```
make pull
make version
```

## Changelog

See release notes: https://github.com/tonglil/auth-gke/releases