getKubeconfig function
Generate a kubeconfig for cluster authentication.
The kubeconfig generated is automatically stringified for ease of use with the pulumi/kubernetes provider.
The kubeconfig uses the new gke-gcloud-auth-plugin authentication plugin as recommended by Google.
See for more details:
- https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke
argsArguments passed to this invoke. Arguments for getKubeconfig.optionsInvoke options controlling this call.
Implementation
Future<GetKubeconfigResult> getKubeconfig(
GetKubeconfigArgs args, {
pulumi.InvokeOptions? options,
}) async {
final deployment = pulumi.Deployment.instance;
final result = await deployment.invoke<Map<String, dynamic>>(
'google-native:container/v1:Cluster/getKubeconfig',
args.toMap(),
options: pulumi.toDeploymentInvokeOptions(options),
);
return GetKubeconfigResult.fromMap(result);
}