rancher / terraform-provider-rke

Terraform provider plugin for deploy kubernetes cluster by RKE(Rancher Kubernetes Engine)
Mozilla Public License 2.0
340 stars 152 forks source link

Removing a taint from a node? #242

Open jlamillan opened 4 years ago

jlamillan commented 4 years ago

Is there any way to remove a taint from a node?

i.e. what we would accomplish by running kubectl taint node master-1 node-role.kubernetes.io/etcd:NoExecute-

I tried the following, but it throws an error about an unsupported effect.

taints {
  key   = "node-role.kubernetes.io/etcd"
  value = ""
  effect = "NoExecute-"
}
remche commented 4 years ago

@jlamillan did you try an empty taints struct ?

taints {}

(note it will remove ALL taints to the considered nodes)

jlamillan commented 4 years ago

Thanks. I'll give it a try and close the bug if it works.

jlamillan commented 4 years ago
      taints {
      }
Calling terraform apply

Error: Missing required argument

  on rke-cluster.tf line 110, in resource "rke_cluster" "cluster":
 110:       taints {

The argument "key" is required, but no definition was found.

Error: Missing required argument

  on rke-cluster.tf line 110, in resource "rke_cluster" "cluster":
 110:       taints {

The argument "value" is required, but no definition was found.

Failed, aborting.
jlamillan commented 4 years ago

@remche - it doesn't seem to like that.

dusmeyenlabut commented 2 years ago

Hello @jlamillan did you solve your issue?