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": "node.kubernetes.io/unreachable", "timeAdded": "2019-06-12T20:38:52Z" } ] [ { "effect": "NoSchedule", "key": "node.kubernetes.io/unreachable", "timeAdded": "2019-06-12T20:38:57Z" } ] [ { "effect": "NoSchedule", "key": "node.kubernetes.io/unreachable", "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!

  • Have you resolved the root cause of the taint? If the node is still unreachable then the controller will just relabel the node with the taint after you try to patch it. – user3499430 Jun 13 at 13:17
  • It seems there is problem with container storage, I 'll put the solution on answer! – Rastin Jun 13 at 18:35

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

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.