mirror of
https://github.com/puppetmaster/typhoon.git
synced 2024-12-26 07:29:32 +01:00
9ec8ec4afc
* Controllers receive etcd TLS credentials * Controllers and workers receive a kubeconfig
23 lines
519 B
HCL
23 lines
519 B
HCL
# Secure copy kubeconfig to all nodes to activate kubelet.service
|
|
resource "null_resource" "copy-kubeconfig" {
|
|
count = "${length(var.worker_names)}"
|
|
|
|
connection {
|
|
type = "ssh"
|
|
host = "${element(var.worker_domains, count.index)}"
|
|
user = "core"
|
|
timeout = "60m"
|
|
}
|
|
|
|
provisioner "file" {
|
|
content = "${var.kubeconfig}"
|
|
destination = "$HOME/kubeconfig"
|
|
}
|
|
|
|
provisioner "remote-exec" {
|
|
inline = [
|
|
"sudo mv /home/core/kubeconfig /etc/kubernetes/kubeconfig",
|
|
]
|
|
}
|
|
}
|