Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
oci.ContainerEngine.getClusterKubeConfig
Explore with Pulumi AI
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
This data source provides details about a specific Cluster Kube Config resource in Oracle Cloud Infrastructure Container Engine service.
Create the Kubeconfig YAML for a cluster.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testClusterKubeConfig = oci.ContainerEngine.getClusterKubeConfig({
clusterId: testCluster.id,
endpoint: clusterKubeConfigEndpoint,
expiration: clusterKubeConfigExpiration,
tokenVersion: clusterKubeConfigTokenVersion,
});
import pulumi
import pulumi_oci as oci
test_cluster_kube_config = oci.ContainerEngine.get_cluster_kube_config(cluster_id=test_cluster["id"],
endpoint=cluster_kube_config_endpoint,
expiration=cluster_kube_config_expiration,
token_version=cluster_kube_config_token_version)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/go/oci/ContainerEngine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ContainerEngine.GetClusterKubeConfig(ctx, &containerengine.GetClusterKubeConfigArgs{
ClusterId: testCluster.Id,
Endpoint: pulumi.StringRef(clusterKubeConfigEndpoint),
Expiration: pulumi.IntRef(clusterKubeConfigExpiration),
TokenVersion: pulumi.StringRef(clusterKubeConfigTokenVersion),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testClusterKubeConfig = Oci.ContainerEngine.GetClusterKubeConfig.Invoke(new()
{
ClusterId = testCluster.Id,
Endpoint = clusterKubeConfigEndpoint,
Expiration = clusterKubeConfigExpiration,
TokenVersion = clusterKubeConfigTokenVersion,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.ContainerEngine.ContainerEngineFunctions;
import com.pulumi.oci.ContainerEngine.inputs.GetClusterKubeConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var testClusterKubeConfig = ContainerEngineFunctions.getClusterKubeConfig(GetClusterKubeConfigArgs.builder()
.clusterId(testCluster.id())
.endpoint(clusterKubeConfigEndpoint)
.expiration(clusterKubeConfigExpiration)
.tokenVersion(clusterKubeConfigTokenVersion)
.build());
}
}
variables:
testClusterKubeConfig:
fn::invoke:
Function: oci:ContainerEngine:getClusterKubeConfig
Arguments:
clusterId: ${testCluster.id}
endpoint: ${clusterKubeConfigEndpoint}
expiration: ${clusterKubeConfigExpiration}
tokenVersion: ${clusterKubeConfigTokenVersion}
Using getClusterKubeConfig
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getClusterKubeConfig(args: GetClusterKubeConfigArgs, opts?: InvokeOptions): Promise<GetClusterKubeConfigResult>
function getClusterKubeConfigOutput(args: GetClusterKubeConfigOutputArgs, opts?: InvokeOptions): Output<GetClusterKubeConfigResult>
def get_cluster_kube_config(cluster_id: Optional[str] = None,
endpoint: Optional[str] = None,
expiration: Optional[int] = None,
token_version: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetClusterKubeConfigResult
def get_cluster_kube_config_output(cluster_id: Optional[pulumi.Input[str]] = None,
endpoint: Optional[pulumi.Input[str]] = None,
expiration: Optional[pulumi.Input[int]] = None,
token_version: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetClusterKubeConfigResult]
func GetClusterKubeConfig(ctx *Context, args *GetClusterKubeConfigArgs, opts ...InvokeOption) (*GetClusterKubeConfigResult, error)
func GetClusterKubeConfigOutput(ctx *Context, args *GetClusterKubeConfigOutputArgs, opts ...InvokeOption) GetClusterKubeConfigResultOutput
> Note: This function is named GetClusterKubeConfig
in the Go SDK.
public static class GetClusterKubeConfig
{
public static Task<GetClusterKubeConfigResult> InvokeAsync(GetClusterKubeConfigArgs args, InvokeOptions? opts = null)
public static Output<GetClusterKubeConfigResult> Invoke(GetClusterKubeConfigInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetClusterKubeConfigResult> getClusterKubeConfig(GetClusterKubeConfigArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:ContainerEngine/getClusterKubeConfig:getClusterKubeConfig
arguments:
# arguments dictionary
The following arguments are supported:
- Cluster
Id string - The OCID of the cluster.
- Endpoint string
- The endpoint to target. A cluster may have multiple endpoints exposed but the kubeconfig can only target one at a time.
- Expiration int
- Deprecated. This field is no longer used.
- Token
Version string - The version of the kubeconfig token. Supported value 2.0.0
- Cluster
Id string - The OCID of the cluster.
- Endpoint string
- The endpoint to target. A cluster may have multiple endpoints exposed but the kubeconfig can only target one at a time.
- Expiration int
- Deprecated. This field is no longer used.
- Token
Version string - The version of the kubeconfig token. Supported value 2.0.0
- cluster
Id String - The OCID of the cluster.
- endpoint String
- The endpoint to target. A cluster may have multiple endpoints exposed but the kubeconfig can only target one at a time.
- expiration Integer
- Deprecated. This field is no longer used.
- token
Version String - The version of the kubeconfig token. Supported value 2.0.0
- cluster
Id string - The OCID of the cluster.
- endpoint string
- The endpoint to target. A cluster may have multiple endpoints exposed but the kubeconfig can only target one at a time.
- expiration number
- Deprecated. This field is no longer used.
- token
Version string - The version of the kubeconfig token. Supported value 2.0.0
- cluster_
id str - The OCID of the cluster.
- endpoint str
- The endpoint to target. A cluster may have multiple endpoints exposed but the kubeconfig can only target one at a time.
- expiration int
- Deprecated. This field is no longer used.
- token_
version str - The version of the kubeconfig token. Supported value 2.0.0
- cluster
Id String - The OCID of the cluster.
- endpoint String
- The endpoint to target. A cluster may have multiple endpoints exposed but the kubeconfig can only target one at a time.
- expiration Number
- Deprecated. This field is no longer used.
- token
Version String - The version of the kubeconfig token. Supported value 2.0.0
getClusterKubeConfig Result
The following output properties are available:
- Cluster
Id string - Content string
- content of the Kubeconfig YAML for the cluster.
- Id string
- The provider-assigned unique ID for this managed resource.
- Endpoint string
- Expiration int
- Token
Version string
- Cluster
Id string - Content string
- content of the Kubeconfig YAML for the cluster.
- Id string
- The provider-assigned unique ID for this managed resource.
- Endpoint string
- Expiration int
- Token
Version string
- cluster
Id String - content String
- content of the Kubeconfig YAML for the cluster.
- id String
- The provider-assigned unique ID for this managed resource.
- endpoint String
- expiration Integer
- token
Version String
- cluster
Id string - content string
- content of the Kubeconfig YAML for the cluster.
- id string
- The provider-assigned unique ID for this managed resource.
- endpoint string
- expiration number
- token
Version string
- cluster_
id str - content str
- content of the Kubeconfig YAML for the cluster.
- id str
- The provider-assigned unique ID for this managed resource.
- endpoint str
- expiration int
- token_
version str
- cluster
Id String - content String
- content of the Kubeconfig YAML for the cluster.
- id String
- The provider-assigned unique ID for this managed resource.
- endpoint String
- expiration Number
- token
Version String
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi