Difference between revisions of "Terraform: kubectl provider"

From wikieduonline
Jump to navigation Jump to search
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
  
 +
* Alekc: [https://github.com/alekc/terraform-provider-kubectl GitHub]
 +
* Gavinbunney (unmmantained since 2022): [https://github.com/gavinbunney/terraform-provider-kubectl/releases GitHub],  [https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs registry]
  
  provider "kubectl" {
+
  {{provider kubectl conf}}
  [[apply_retry_count]]      = 5
 
  host                  = [[module.eks.cluster_endpoint]]
 
  cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data)
 
  [[load_config_file]]      = false
 
 
  exec {
 
    api_version = "[[client.authentication.k8s.io/v1beta1]]"
 
    command    = "aws"
 
    # This requires the awscli to be installed locally where Terraform is executed
 
    args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name]
 
  }
 
}
 
  
  
 +
== See also ==
 +
* {{kubectl}}
 +
* {{tf kubectl provider}}
  
{{kubectl}}
 
  
{{tf providers}}
+
[[Category:Terraform]]
 +
[[Category:kubectl]]

Latest revision as of 08:29, 15 August 2024

 provider "kubectl" {
 host                   = module.eks.cluster_endpoint
 cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data)
 load_config_file       = false
 apply_retry_count      = 5

 exec {
   api_version = "client.authentication.k8s.io/v1beta1"
   command     = "aws"
   # This requires the awscli to be installed locally where Terraform is executed
   args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name]
 }
}


See also[edit]

Advertising: