Add correct kubelet-arg & set /var/lib/kubelet/volumeplugins in general
This commit is contained in:
parent
f4dc291429
commit
8615d36cda
10
agents.tf
10
agents.tf
@ -44,19 +44,15 @@ resource "null_resource" "agents" {
|
||||
|
||||
# Generating k3s agent config file
|
||||
provisioner "file" {
|
||||
content = yamlencode(merge({
|
||||
content = yamlencode({
|
||||
node-name = module.agents[each.key].name
|
||||
server = "https://${module.control_planes[0].private_ipv4_address}:6443"
|
||||
token = random_password.k3s_token.result
|
||||
kubelet-arg = "cloud-provider=external"
|
||||
kubelet-arg = ["cloud-provider=external", "volume-plugin-dir=/var/lib/kubelet/volumeplugins"]
|
||||
flannel-iface = "eth1"
|
||||
node-ip = module.agents[each.key].private_ipv4_address
|
||||
node-label = var.automatically_upgrade_k3s ? ["k3s_upgrade=true"] : []
|
||||
},
|
||||
var.cni_plugin == "calico" ? {
|
||||
flannel-backend = "none"
|
||||
kube-controller-manager-arg = "flex-volume-plugin-dir=/var/lib/kubelet/volumeplugins"
|
||||
} : {}))
|
||||
})
|
||||
destination = "/tmp/config.yaml"
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,8 @@ resource "null_resource" "control_planes" {
|
||||
disable-cloud-controller = true
|
||||
disable = local.disable_extras
|
||||
flannel-iface = "eth1"
|
||||
kubelet-arg = "cloud-provider=external"
|
||||
kubelet-arg = ["cloud-provider=external", "volume-plugin-dir=/var/lib/kubelet/volumeplugins"]
|
||||
kube-controller-manager-arg = "flex-volume-plugin-dir=/var/lib/kubelet/volumeplugins"
|
||||
node-ip = module.control_planes[count.index].private_ipv4_address
|
||||
advertise-address = module.control_planes[count.index].private_ipv4_address
|
||||
node-taint = var.allow_scheduling_on_control_plane ? [] : ["node-role.kubernetes.io/master:NoSchedule"]
|
||||
@ -59,7 +60,6 @@ resource "null_resource" "control_planes" {
|
||||
},
|
||||
var.cni_plugin == "calico" ? {
|
||||
flannel-backend = "none"
|
||||
kube-controller-manager-arg = "flex-volume-plugin-dir=/var/lib/kubelet/volumeplugins"
|
||||
} : {}))
|
||||
destination = "/tmp/config.yaml"
|
||||
}
|
||||
|
4
init.tf
4
init.tf
@ -15,7 +15,8 @@ resource "null_resource" "first_control_plane" {
|
||||
disable-cloud-controller = true
|
||||
disable = local.disable_extras
|
||||
flannel-iface = "eth1"
|
||||
kubelet-arg = "cloud-provider=external"
|
||||
kubelet-arg = ["cloud-provider=external", "volume-plugin-dir=/var/lib/kubelet/volumeplugins"]
|
||||
kube-controller-manager-arg = "flex-volume-plugin-dir=/var/lib/kubelet/volumeplugins"
|
||||
node-ip = module.control_planes[0].private_ipv4_address
|
||||
advertise-address = module.control_planes[0].private_ipv4_address
|
||||
node-taint = var.allow_scheduling_on_control_plane ? [] : ["node-role.kubernetes.io/master:NoSchedule"]
|
||||
@ -24,7 +25,6 @@ resource "null_resource" "first_control_plane" {
|
||||
},
|
||||
var.cni_plugin == "calico" ? {
|
||||
flannel-backend = "none"
|
||||
kube-controller-manager-arg = "flex-volume-plugin-dir=/var/lib/kubelet/volumeplugins"
|
||||
} : {}))
|
||||
destination = "/tmp/config.yaml"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user