google-github-actions/Get GKE Credentials
Generate ephemeral credentials for authenticating to Google Kubernetes Engine (GKE) and kubectl, helm, etc.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| cluster_name | Name of the cluster for which to get credentials. This can be specified as a full resource name: projects/<project>/locations/<location>/clusters/<cluster> In which case the `project_id` and `location` inputs are optional. If only specified as a name: <cluster> then both the `project_id` and `location` may be required. | yes | — |
| location | Location (region or zone) in which the cluster resides. This value is required unless `cluster_name` is a full resource name. | no | — |
| project_id | Project ID where the cluster is deployed. If provided, this will override the project configured by previous steps or environment variables. If not provided, the project will be inferred from the environment, best-effort. | no | — |
| context_name | Name to use when creating the `kubectl` context. If not specified, the default value is `gke_<project>_<location>_<cluster>`. | no | — |
| namespace | Name of the Kubernetes namespace to use within the context. | no | — |
| use_auth_provider | Set this to true to use the Google Cloud auth plugin in `kubectl` instead of inserting a short-lived access token. | no | false |
| use_internal_ip | Set this to true to use the internal IP address for the cluster endpoint. This is mostly used with private GKE clusters. | no | false |
| use_connect_gateway | Set this to true to use the [Connect Gateway endpoint](https://cloud.google.com/anthos/multicluster-management/gateway) to connect to cluster. | no | false |
| use_dns_based_endpoint | Set this true to use [DNS-based endpoint](https://cloud.google.com/kubernetes-engine/docs/concepts/network-isolation#dns-based_endpoint) to connect to the cluster. | no | false |
| fleet_membership_name | Fleet membership name to use for generating Connect Gateway endpoint, of the form: projects/<project>/locations/<location>/memberships/<membership> This only applies if `use_connect_gateway` is true. Defaults to auto discovery if empty. | no | — |
| quota_project_id | Project ID from which to pull quota. The caller must have `serviceusage.services.use` permission on the project. If unspecified, this defaults to the project of the authenticated principle. This is an advanced setting, most users should leave this blank. | no | — |
Outputs
| name | description |
|---|---|
| kubeconfig_path | Path on the local filesystem where the generated Kubernetes configuration file resides. |