Skip to main content

okustera_kubernetes_cluster_config (Data Source)

The okustera_kubernetes_cluster_config data source fetches the live, signed Kubeconfig for an existing Kubernetes cluster in Okustera, allowing direct chaining with the Terraform kubernetes and helm providers without manual file copying or credential leakage.

Example Usage​

data "okustera_kubernetes_cluster_config" "staging" {
cluster_id = "cls-89f41b2a"
}

provider "helm" {
kubernetes {
config_path = null
# Use dynamically fetched kubeconfig
}
}

output "cluster_name" {
value = data.okustera_kubernetes_cluster_config.staging.cluster_name
}

Schema​

Required​

  • cluster_id (String) The UUID or name of the Kubernetes cluster.

Read-Only Attributes​

  • id (String) Data source identifier (equals cluster_id).
  • cluster_name (String) Human-readable cluster name.
  • kubeconfig (String, Sensitive) Complete YAML kubeconfig string with client certs and tokens.