mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-03 13:30:57 +07:00
Change kube config file name
This commit is contained in:
parent
cda886384e
commit
6066cd7728
@ -3,17 +3,6 @@ provider "rke" {
|
||||
}
|
||||
|
||||
resource rke_cluster "cluster" {
|
||||
nodes {
|
||||
address = "192.168.1.17"
|
||||
user = "root"
|
||||
role = [
|
||||
"controlplane",
|
||||
"etcd",
|
||||
"worker"
|
||||
]
|
||||
ssh_key = file("~/.ssh/id_rsa")
|
||||
}
|
||||
|
||||
dynamic "nodes" {
|
||||
for_each = [
|
||||
"192.168.1.21",
|
||||
@ -24,15 +13,30 @@ resource rke_cluster "cluster" {
|
||||
address = nodes.value
|
||||
user = "root"
|
||||
role = [
|
||||
"worker",
|
||||
"etcd"
|
||||
"controlplane",
|
||||
"etcd",
|
||||
"worker"
|
||||
]
|
||||
ssh_key = file("~/.ssh/id_rsa")
|
||||
}
|
||||
}
|
||||
|
||||
dynamic "nodes" {
|
||||
for_each = [
|
||||
"192.168.1.17"
|
||||
]
|
||||
content {
|
||||
address = nodes.value
|
||||
user = "root"
|
||||
role = [
|
||||
"worker"
|
||||
]
|
||||
ssh_key = file("~/.ssh/id_rsa")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "local_file" "kube_cluster_yaml" {
|
||||
filename = "${path.root}/kube_config_cluster.yml"
|
||||
resource "local_file" "kube_config_yaml" {
|
||||
filename = "${path.root}/kube_config.yaml"
|
||||
content = rke_cluster.cluster.kube_config_yaml
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user