Skip to content
Snippets Groups Projects
Commit fef5ca14 authored by MUNIER Florian's avatar MUNIER Florian
Browse files

[add] add k3s on nodes

parent 9fa16c07
No related branches found
No related tags found
No related merge requests found
......@@ -24,3 +24,29 @@ resource "null_resource" "install_kubernetes_bastion" {
}
# Join the worker nodes to the Kubernetes cluster
resource "null_resource" "join_worker_nodes" {
for_each = toset(var.INSTANCE_ORCHEST_NAME)
# Connexion aux instances du cluster
connection {
type = "ssh"
user = "ubuntu"
bastion_private_key = "${openstack_compute_keypair_v2.keypair_project.private_key}"
bastion_host = "${openstack_networking_floatingip_v2.floatip_admin.address}"
private_key = "${openstack_compute_keypair_v2.keypair_cluster.private_key}"
host = "${openstack_compute_instance_v2.orchestration_instance[each.key].access_ip_v4}"
agent = "false"
}
provisioner "remote-exec" {
inline = [
#"sudo apt update",
"sudo curl -sfL https://get.k3s.io | sh -s - --disable traefik server",]
}
depends_on = [openstack_compute_instance_v2.bastion_instance,
openstack_compute_instance_v2.orchestration_instance,
null_resource.install_kubernetes_bastion]
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment