Celeb Glow
general | March 18, 2026

Removing Taint from kubernete nodes doesnot work

Ubuntu 18.04
Kubernete on JUJU

I tried to remove the taint form nodes: kubectl get nodes -o json | jq .items[].spec.taints [ { "effect": "NoSchedule", "key": "", "timeAdded": "2019-06-12T20:38:52Z" } ] [ { "effect": "NoSchedule", "key": "", "timeAdded": "2019-06-12T20:38:57Z" } ] [ { "effect": "NoSchedule", "key": "", "timeAdded": "2019-06-12T20:39:00Z" } ]

with this command:

kubectl patch node juju-06819a-0-lxd-70 -p '{"spec":{"taints":[]}}'

node/juju-06819a-0-lxd-70 patched rastin@cloudrnd1:~/.kube$ kubectl patch node juju-06819a-0-lxd-71 -p '{"spec":{"taints":[]}}' node/juju-06819a-0-lxd-71 patched rastin@cloudrnd1:~/.kube$ kubectl patch node juju-06819a-0-lxd-72 -p '{"spec":{"taints":[]}}' node/juju-06819a-0-lxd-72 patched

Nothing happened all the taint still there!

2

1 Answer

I found the solution here with little bit of change:

On the machine which I have the LXDs I changed the profile to use 'dir' :

name: juju-##MODEL## config: boot.autostart: "true" linux.kernel_modules: ip_tables,ip6_tables,netlink_diag,nf_nat,overlay raw.lxc: | lxc.apparmor.profile=unconfined lxc.mount.auto=proc:rw sys:rw lxc.cap.drop= security.nesting: "true" security.privileged: "true" description: "" devices: aadisable: path: /sys/module/nf_conntrack/parameters/hashsize source: /dev/null type: disk aadisable1: path: /sys/module/apparmor/parameters/enabled source: /dev/null type: disk

Then I applied this profile to my LXC:

sudo lxc profile assign <container-name> default Profiles default applied to <container-name>

You can get 'container-name' by running : $lxc list

Then I restarted all containers:

$sudo lxc restart --all

Now all nodes are ready :

$kubectl get nodes NAME STATUS ROLES AGE VERSION container#1 Ready <none> 6d v1.14.2 container#2 Ready <none> 6d v1.14.2 container#3 Ready <none> 3d v1.14.2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy