diff --git a/copy_images.tf b/copy_images.tf index b672d6a..a5134e1 100644 --- a/copy_images.tf +++ b/copy_images.tf @@ -1,5 +1,6 @@ locals { autoscaler_key = format("%v#%v", "cluster-autoscaler", var.cluster_autoscaler_tag) + kubectl_key = format("%v#%v", "kubectl", var.kubectl_image_tag) image_config = [ { @@ -11,6 +12,15 @@ locals { source_tag = null tag = var.cluster_autoscaler_tag }, + { + enabled = true + dest_path = null + name = "kubectl" + source_image = "bitnami/kubectl" + source_registry = "docker.io" + source_tag = var.kubectl_image_tag + tag = var.kubectl_image_tag + }, ] } diff --git a/outputs.tf b/outputs.tf index 73f5b09..e6c12c0 100644 --- a/outputs.tf +++ b/outputs.tf @@ -287,3 +287,23 @@ output "self_managed_node_groups_autoscaling_group_names" { # Additional ################################################################################ +output "kubectl_image_full_path" { + description = "The full URI to access the kubectl image including the registry/repository:tag" + value = module.images.images[local.kubectl_key].dest_full_path +} + +output "kubectl_image_registry" { + description = "The registry portion of the URI to access the kubectl image" + value = module.images.images[local.kubectl_key].dest_registry +} + +output "kubectl_image_repository" { + description = "The repository portion of the URI to access the kubectl image" + value = module.images.images[local.kubectl_key].dest_repository +} + +output "kubectl_image_tag" { + description = "The tag portion of the URI to access the kubectl image" + value = module.images.images[local.kubectl_key].tag +} + diff --git a/variables.tf b/variables.tf index c2822e0..fd16917 100644 --- a/variables.tf +++ b/variables.tf @@ -51,6 +51,12 @@ variable "cluster_autoscaler_tag" { default = "v1.27.2" } +variable "kubectl_image_tag" { + description = "The version of bitnami/kubectl image to use." + type = string + default = "1.27.1" +} + variable "eks_instance_disk_size" { description = "The size of the disk of the worker nodes in gigabytes. 40 is the approximate minimum. Needs to hold the all of the normal operating system files plus every image that will be used in the cluster." type = number