rancher2 logo
Rancher 2 v4.0.0, Apr 20 23

rancher2.getClusterV2

Explore with Pulumi AI

Use this data source to retrieve information about a Rancher v2 cluster.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Rancher2 = Pulumi.Rancher2;

return await Deployment.RunAsync(() => 
{
    var foo = Rancher2.GetClusterV2.Invoke(new()
    {
        FleetNamespace = "fleet-ns",
        Name = "foo",
    });

});
package main

import (
	"github.com/pulumi/pulumi-rancher2/sdk/v4/go/rancher2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := rancher2.LookupClusterV2(ctx, &rancher2.LookupClusterV2Args{
			FleetNamespace: pulumi.StringRef("fleet-ns"),
			Name:           "foo",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.rancher2.Rancher2Functions;
import com.pulumi.rancher2.inputs.GetClusterV2Args;
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 foo = Rancher2Functions.getClusterV2(GetClusterV2Args.builder()
            .fleetNamespace("fleet-ns")
            .name("foo")
            .build());

    }
}
import pulumi
import pulumi_rancher2 as rancher2

foo = rancher2.get_cluster_v2(fleet_namespace="fleet-ns",
    name="foo")
import * as pulumi from "@pulumi/pulumi";
import * as rancher2 from "@pulumi/rancher2";

const foo = rancher2.getClusterV2({
    fleetNamespace: "fleet-ns",
    name: "foo",
});
variables:
  foo:
    fn::invoke:
      Function: rancher2:getClusterV2
      Arguments:
        fleetNamespace: fleet-ns
        name: foo

Using getClusterV2

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 getClusterV2(args: GetClusterV2Args, opts?: InvokeOptions): Promise<GetClusterV2Result>
function getClusterV2Output(args: GetClusterV2OutputArgs, opts?: InvokeOptions): Output<GetClusterV2Result>
def get_cluster_v2(fleet_namespace: Optional[str] = None,
                   name: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetClusterV2Result
def get_cluster_v2_output(fleet_namespace: Optional[pulumi.Input[str]] = None,
                   name: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetClusterV2Result]
func LookupClusterV2(ctx *Context, args *LookupClusterV2Args, opts ...InvokeOption) (*LookupClusterV2Result, error)
func LookupClusterV2Output(ctx *Context, args *LookupClusterV2OutputArgs, opts ...InvokeOption) LookupClusterV2ResultOutput

> Note: This function is named LookupClusterV2 in the Go SDK.

public static class GetClusterV2 
{
    public static Task<GetClusterV2Result> InvokeAsync(GetClusterV2Args args, InvokeOptions? opts = null)
    public static Output<GetClusterV2Result> Invoke(GetClusterV2InvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetClusterV2Result> getClusterV2(GetClusterV2Args args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: rancher2:index/getClusterV2:getClusterV2
  arguments:
    # arguments dictionary

The following arguments are supported:

Name string

The name of the Cluster v2 (string)

FleetNamespace string

The fleet namespace of the Cluster v2. Default: \"fleet-default\" (string)

Name string

The name of the Cluster v2 (string)

FleetNamespace string

The fleet namespace of the Cluster v2. Default: \"fleet-default\" (string)

name String

The name of the Cluster v2 (string)

fleetNamespace String

The fleet namespace of the Cluster v2. Default: \"fleet-default\" (string)

name string

The name of the Cluster v2 (string)

fleetNamespace string

The fleet namespace of the Cluster v2. Default: \"fleet-default\" (string)

name str

The name of the Cluster v2 (string)

fleet_namespace str

The fleet namespace of the Cluster v2. Default: \"fleet-default\" (string)

name String

The name of the Cluster v2 (string)

fleetNamespace String

The fleet namespace of the Cluster v2. Default: \"fleet-default\" (string)

getClusterV2 Result

The following output properties are available:

AgentEnvVars List<GetClusterV2AgentEnvVar>

(Computed) Optional Agent Env Vars for Rancher agent (list)

Annotations Dictionary<string, object>
CloudCredentialSecretName string

(Computed) Cluster V2 cloud credential secret name (string)

ClusterRegistrationToken GetClusterV2ClusterRegistrationToken

(Computed/Sensitive) Cluster Registration Token generated for the cluster v2 (list maxitems:1)

ClusterV1Id string

(Computed) Cluster v1 id for cluster v2 (string)

DefaultClusterRoleForProjectMembers string

(Computed) Cluster V2 default cluster role for project members (string)

DefaultPodSecurityPolicyTemplateName string

(Computed) Cluster V2 default pod security policy template name (string)

EnableNetworkPolicy bool

(Computed) Enable k8s network policy at Cluster V2 (bool)

Id string

The provider-assigned unique ID for this managed resource.

KubeConfig string

(Computed/Sensitive) Kube Config generated for the cluster v2 (string)

KubernetesVersion string

(Computed) The kubernetes version of the Cluster v2 (list maxitems:1)

Labels Dictionary<string, object>
Name string
ResourceVersion string

(Computed) Cluster v2 k8s resource version (string)

RkeConfig GetClusterV2RkeConfig

(Computed) The RKE configuration for k3s and rke2 Clusters v2. (list maxitems:1)

FleetNamespace string
AgentEnvVars []GetClusterV2AgentEnvVar

(Computed) Optional Agent Env Vars for Rancher agent (list)

Annotations map[string]interface{}
CloudCredentialSecretName string

(Computed) Cluster V2 cloud credential secret name (string)

ClusterRegistrationToken GetClusterV2ClusterRegistrationToken

(Computed/Sensitive) Cluster Registration Token generated for the cluster v2 (list maxitems:1)

ClusterV1Id string

(Computed) Cluster v1 id for cluster v2 (string)

DefaultClusterRoleForProjectMembers string

(Computed) Cluster V2 default cluster role for project members (string)

DefaultPodSecurityPolicyTemplateName string

(Computed) Cluster V2 default pod security policy template name (string)

EnableNetworkPolicy bool

(Computed) Enable k8s network policy at Cluster V2 (bool)

Id string

The provider-assigned unique ID for this managed resource.

KubeConfig string

(Computed/Sensitive) Kube Config generated for the cluster v2 (string)

KubernetesVersion string

(Computed) The kubernetes version of the Cluster v2 (list maxitems:1)

Labels map[string]interface{}
Name string
ResourceVersion string

(Computed) Cluster v2 k8s resource version (string)

RkeConfig GetClusterV2RkeConfig

(Computed) The RKE configuration for k3s and rke2 Clusters v2. (list maxitems:1)

FleetNamespace string
agentEnvVars List<GetClusterV2AgentEnvVar>

(Computed) Optional Agent Env Vars for Rancher agent (list)

annotations Map<String,Object>
cloudCredentialSecretName String

(Computed) Cluster V2 cloud credential secret name (string)

clusterRegistrationToken GetClusterV2ClusterRegistrationToken

(Computed/Sensitive) Cluster Registration Token generated for the cluster v2 (list maxitems:1)

clusterV1Id String

(Computed) Cluster v1 id for cluster v2 (string)

defaultClusterRoleForProjectMembers String

(Computed) Cluster V2 default cluster role for project members (string)

defaultPodSecurityPolicyTemplateName String

(Computed) Cluster V2 default pod security policy template name (string)

enableNetworkPolicy Boolean

(Computed) Enable k8s network policy at Cluster V2 (bool)

id String

The provider-assigned unique ID for this managed resource.

kubeConfig String

(Computed/Sensitive) Kube Config generated for the cluster v2 (string)

kubernetesVersion String

(Computed) The kubernetes version of the Cluster v2 (list maxitems:1)

labels Map<String,Object>
name String
resourceVersion String

(Computed) Cluster v2 k8s resource version (string)

rkeConfig GetClusterV2RkeConfig

(Computed) The RKE configuration for k3s and rke2 Clusters v2. (list maxitems:1)

fleetNamespace String
agentEnvVars GetClusterV2AgentEnvVar[]

(Computed) Optional Agent Env Vars for Rancher agent (list)

annotations {[key: string]: any}
cloudCredentialSecretName string

(Computed) Cluster V2 cloud credential secret name (string)

clusterRegistrationToken GetClusterV2ClusterRegistrationToken

(Computed/Sensitive) Cluster Registration Token generated for the cluster v2 (list maxitems:1)

clusterV1Id string

(Computed) Cluster v1 id for cluster v2 (string)

defaultClusterRoleForProjectMembers string

(Computed) Cluster V2 default cluster role for project members (string)

defaultPodSecurityPolicyTemplateName string

(Computed) Cluster V2 default pod security policy template name (string)

enableNetworkPolicy boolean

(Computed) Enable k8s network policy at Cluster V2 (bool)

id string

The provider-assigned unique ID for this managed resource.

kubeConfig string

(Computed/Sensitive) Kube Config generated for the cluster v2 (string)

kubernetesVersion string

(Computed) The kubernetes version of the Cluster v2 (list maxitems:1)

labels {[key: string]: any}
name string
resourceVersion string

(Computed) Cluster v2 k8s resource version (string)

rkeConfig GetClusterV2RkeConfig

(Computed) The RKE configuration for k3s and rke2 Clusters v2. (list maxitems:1)

fleetNamespace string
agent_env_vars Sequence[GetClusterV2AgentEnvVar]

(Computed) Optional Agent Env Vars for Rancher agent (list)

annotations Mapping[str, Any]
cloud_credential_secret_name str

(Computed) Cluster V2 cloud credential secret name (string)

cluster_registration_token GetClusterV2ClusterRegistrationToken

(Computed/Sensitive) Cluster Registration Token generated for the cluster v2 (list maxitems:1)

cluster_v1_id str

(Computed) Cluster v1 id for cluster v2 (string)

default_cluster_role_for_project_members str

(Computed) Cluster V2 default cluster role for project members (string)

default_pod_security_policy_template_name str

(Computed) Cluster V2 default pod security policy template name (string)

enable_network_policy bool

(Computed) Enable k8s network policy at Cluster V2 (bool)

id str

The provider-assigned unique ID for this managed resource.

kube_config str

(Computed/Sensitive) Kube Config generated for the cluster v2 (string)

kubernetes_version str

(Computed) The kubernetes version of the Cluster v2 (list maxitems:1)

labels Mapping[str, Any]
name str
resource_version str

(Computed) Cluster v2 k8s resource version (string)

rke_config GetClusterV2RkeConfig

(Computed) The RKE configuration for k3s and rke2 Clusters v2. (list maxitems:1)

fleet_namespace str
agentEnvVars List<Property Map>

(Computed) Optional Agent Env Vars for Rancher agent (list)

annotations Map<Any>
cloudCredentialSecretName String

(Computed) Cluster V2 cloud credential secret name (string)

clusterRegistrationToken Property Map

(Computed/Sensitive) Cluster Registration Token generated for the cluster v2 (list maxitems:1)

clusterV1Id String

(Computed) Cluster v1 id for cluster v2 (string)

defaultClusterRoleForProjectMembers String

(Computed) Cluster V2 default cluster role for project members (string)

defaultPodSecurityPolicyTemplateName String

(Computed) Cluster V2 default pod security policy template name (string)

enableNetworkPolicy Boolean

(Computed) Enable k8s network policy at Cluster V2 (bool)

id String

The provider-assigned unique ID for this managed resource.

kubeConfig String

(Computed/Sensitive) Kube Config generated for the cluster v2 (string)

kubernetesVersion String

(Computed) The kubernetes version of the Cluster v2 (list maxitems:1)

labels Map<Any>
name String
resourceVersion String

(Computed) Cluster v2 k8s resource version (string)

rkeConfig Property Map

(Computed) The RKE configuration for k3s and rke2 Clusters v2. (list maxitems:1)

fleetNamespace String

Supporting Types

GetClusterV2AgentEnvVar

Name string

The name of the Cluster v2 (string)

Value string
Name string

The name of the Cluster v2 (string)

Value string
name String

The name of the Cluster v2 (string)

value String
name string

The name of the Cluster v2 (string)

value string
name str

The name of the Cluster v2 (string)

value str
name String

The name of the Cluster v2 (string)

value String

GetClusterV2ClusterRegistrationToken

Annotations Dictionary<string, object>
ClusterId string
Command string
Id string

(Computed) The ID of the resource (string)

InsecureCommand string
InsecureNodeCommand string
InsecureWindowsNodeCommand string
Labels Dictionary<string, object>
ManifestUrl string
Name string

The name of the Cluster v2 (string)

NodeCommand string
Token string
WindowsNodeCommand string
Annotations map[string]interface{}
ClusterId string
Command string
Id string

(Computed) The ID of the resource (string)

InsecureCommand string
InsecureNodeCommand string
InsecureWindowsNodeCommand string
Labels map[string]interface{}
ManifestUrl string
Name string

The name of the Cluster v2 (string)

NodeCommand string
Token string
WindowsNodeCommand string
annotations Map<String,Object>
clusterId String
command String
id String

(Computed) The ID of the resource (string)

insecureCommand String
insecureNodeCommand String
insecureWindowsNodeCommand String
labels Map<String,Object>
manifestUrl String
name String

The name of the Cluster v2 (string)

nodeCommand String
token String
windowsNodeCommand String
annotations {[key: string]: any}
clusterId string
command string
id string

(Computed) The ID of the resource (string)

insecureCommand string
insecureNodeCommand string
insecureWindowsNodeCommand string
labels {[key: string]: any}
manifestUrl string
name string

The name of the Cluster v2 (string)

nodeCommand string
token string
windowsNodeCommand string
annotations Mapping[str, Any]
cluster_id str
command str
id str

(Computed) The ID of the resource (string)

insecure_command str
insecure_node_command str
insecure_windows_node_command str
labels Mapping[str, Any]
manifest_url str
name str

The name of the Cluster v2 (string)

node_command str
token str
windows_node_command str
annotations Map<Any>
clusterId String
command String
id String

(Computed) The ID of the resource (string)

insecureCommand String
insecureNodeCommand String
insecureWindowsNodeCommand String
labels Map<Any>
manifestUrl String
name String

The name of the Cluster v2 (string)

nodeCommand String
token String
windowsNodeCommand String

GetClusterV2RkeConfig

GetClusterV2RkeConfigEtcd

GetClusterV2RkeConfigEtcdS3Config

Bucket string
Endpoint string
CloudCredentialName string
EndpointCa string
Folder string
Region string
SkipSslVerify bool
Bucket string
Endpoint string
CloudCredentialName string
EndpointCa string
Folder string
Region string
SkipSslVerify bool
bucket String
endpoint String
cloudCredentialName String
endpointCa String
folder String
region String
skipSslVerify Boolean
bucket string
endpoint string
cloudCredentialName string
endpointCa string
folder string
region string
skipSslVerify boolean
bucket String
endpoint String
cloudCredentialName String
endpointCa String
folder String
region String
skipSslVerify Boolean

GetClusterV2RkeConfigEtcdSnapshotCreate

generation Integer
generation number
generation Number

GetClusterV2RkeConfigEtcdSnapshotRestore

Generation int
Name string

The name of the Cluster v2 (string)

RestoreRkeConfig string
Generation int
Name string

The name of the Cluster v2 (string)

RestoreRkeConfig string
generation Integer
name String

The name of the Cluster v2 (string)

restoreRkeConfig String
generation number
name string

The name of the Cluster v2 (string)

restoreRkeConfig string
generation int
name str

The name of the Cluster v2 (string)

restore_rke_config str
generation Number
name String

The name of the Cluster v2 (string)

restoreRkeConfig String

GetClusterV2RkeConfigLocalAuthEndpoint

CaCerts string
Enabled bool
Fqdn string
CaCerts string
Enabled bool
Fqdn string
caCerts String
enabled Boolean
fqdn String
caCerts string
enabled boolean
fqdn string
ca_certs str
enabled bool
fqdn str
caCerts String
enabled Boolean
fqdn String

GetClusterV2RkeConfigMachinePool

annotations {[key: string]: any}
labels {[key: string]: any}
machineConfig GetClusterV2RkeConfigMachinePoolMachineConfig
machineLabels {[key: string]: any}
name string

The name of the Cluster v2 (string)

cloudCredentialSecretName string

(Computed) Cluster V2 cloud credential secret name (string)

controlPlaneRole boolean
drainBeforeDelete boolean
etcdRole boolean
maxUnhealthy string
nodeDrainTimeout number
nodeStartupTimeoutSeconds number
paused boolean
quantity number
rollingUpdate GetClusterV2RkeConfigMachinePoolRollingUpdate
taints GetClusterV2RkeConfigMachinePoolTaint[]
unhealthyNodeTimeoutSeconds number
unhealthyRange string
workerRole boolean
annotations Map<Any>
labels Map<Any>
machineConfig Property Map
machineLabels Map<Any>
name String

The name of the Cluster v2 (string)

cloudCredentialSecretName String

(Computed) Cluster V2 cloud credential secret name (string)

controlPlaneRole Boolean
drainBeforeDelete Boolean
etcdRole Boolean
maxUnhealthy String
nodeDrainTimeout Number
nodeStartupTimeoutSeconds Number
paused Boolean
quantity Number
rollingUpdate Property Map
taints List<Property Map>
unhealthyNodeTimeoutSeconds Number
unhealthyRange String
workerRole Boolean

GetClusterV2RkeConfigMachinePoolMachineConfig

Kind string
Name string

The name of the Cluster v2 (string)

Kind string
Name string

The name of the Cluster v2 (string)

kind String
name String

The name of the Cluster v2 (string)

kind string
name string

The name of the Cluster v2 (string)

kind str
name str

The name of the Cluster v2 (string)

kind String
name String

The name of the Cluster v2 (string)

GetClusterV2RkeConfigMachinePoolRollingUpdate

GetClusterV2RkeConfigMachinePoolTaint

Key string
Value string
Effect string
Key string
Value string
Effect string
key String
value String
effect String
key string
value string
effect string
key str
value str
effect str
key String
value String
effect String

GetClusterV2RkeConfigMachineSelectorConfig

GetClusterV2RkeConfigMachineSelectorConfigMachineLabelSelector

GetClusterV2RkeConfigMachineSelectorConfigMachineLabelSelectorMatchExpression

Key string
Operator string
Values List<string>
Key string
Operator string
Values []string
key String
operator String
values List<String>
key string
operator string
values string[]
key str
operator str
values Sequence[str]
key String
operator String
values List<String>

GetClusterV2RkeConfigRegistries

GetClusterV2RkeConfigRegistriesConfig

GetClusterV2RkeConfigRegistriesMirror

Hostname string
Endpoints List<string>
Rewrites Dictionary<string, object>
Hostname string
Endpoints []string
Rewrites map[string]interface{}
hostname String
endpoints List<String>
rewrites Map<String,Object>
hostname string
endpoints string[]
rewrites {[key: string]: any}
hostname str
endpoints Sequence[str]
rewrites Mapping[str, Any]
hostname String
endpoints List<String>
rewrites Map<Any>

GetClusterV2RkeConfigRotateCertificates

Generation int
Services List<string>
Generation int
Services []string
generation Integer
services List<String>
generation number
services string[]
generation int
services Sequence[str]
generation Number
services List<String>

GetClusterV2RkeConfigUpgradeStrategy

GetClusterV2RkeConfigUpgradeStrategyControlPlaneDrainOptions

GetClusterV2RkeConfigUpgradeStrategyWorkerDrainOptions

Package Details

Repository
Rancher2 pulumi/pulumi-rancher2
License
Apache-2.0
Notes

This Pulumi package is based on the rancher2 Terraform Provider.