getKubeconfig function

Future<GetKubeconfigResult> getKubeconfig(
  1. GetKubeconfigArgs args, {
  2. InvokeOptions? options,
})

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:

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);
}