diff --git a/bare-metal/container-linux/kubernetes/ssh.tf b/bare-metal/container-linux/kubernetes/ssh.tf index a345f744..479e2139 100644 --- a/bare-metal/container-linux/kubernetes/ssh.tf +++ b/bare-metal/container-linux/kubernetes/ssh.tf @@ -72,7 +72,7 @@ resource "null_resource" "bootkube-start" { # Without depends_on, this remote-exec may start before the kubeconfig copy. # Terraform only does one task at a time, so it would try to bootstrap # Kubernetes and Tectonic while no Kubelets are running. Ensure all nodes - # receive a kubeconfig before proceeding with bootkube and tectonic. + # receive a kubeconfig before proceeding with bootkube. depends_on = ["null_resource.copy-secrets"] connection { diff --git a/digital-ocean/container-linux/kubernetes/bootkube.tf b/digital-ocean/container-linux/kubernetes/bootkube.tf index fd959a0c..dab87a13 100644 --- a/digital-ocean/container-linux/kubernetes/bootkube.tf +++ b/digital-ocean/container-linux/kubernetes/bootkube.tf @@ -3,7 +3,7 @@ module "bootkube" { source = "git::https://github.com/dghubble/bootkube-terraform.git?ref=v0.6.0" cluster_name = "${var.cluster_name}" - api_servers = ["${var.k8s_domain_name}"] + api_servers = ["${format("%s.%s", var.cluster_name, var.dns_zone)}"] etcd_servers = ["http://127.0.0.1:2379"] asset_dir = "${var.asset_dir}" pod_cidr = "${var.pod_cidr}" diff --git a/digital-ocean/container-linux/kubernetes/outputs.tf b/digital-ocean/container-linux/kubernetes/outputs.tf index d49b752f..3f8608af 100644 --- a/digital-ocean/container-linux/kubernetes/outputs.tf +++ b/digital-ocean/container-linux/kubernetes/outputs.tf @@ -1,9 +1,9 @@ output "controllers_dns" { - value = "${digitalocean_record.controllers.fqdn}" + value = "${digitalocean_record.controllers.0.fqdn}" } output "workers_dns" { - value = "${digitalocean_record.workers.fqdn}" + value = "${digitalocean_record.workers.0.fqdn}" } output "controllers_ipv4" { diff --git a/digital-ocean/container-linux/kubernetes/variables.tf b/digital-ocean/container-linux/kubernetes/variables.tf index 520c820f..0d655673 100644 --- a/digital-ocean/container-linux/kubernetes/variables.tf +++ b/digital-ocean/container-linux/kubernetes/variables.tf @@ -49,11 +49,6 @@ variable "ssh_fingerprints" { # bootkube assets -variable "k8s_domain_name" { - type = "string" - description = "Controller DNS name which resolves to the controller instance. Kubectl and workers use TLS client credentials to communicate via this endpoint." -} - variable "asset_dir" { description = "Path to a directory where generated assets should be placed (contains secrets)" type = "string"