Удаление Paint из узлов kubernetes не работает

Ubuntu 18.04
Kubernete на JUJU


Я пытался удалить узлы с порочной формой: 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

Ничего не произошло, все еще там заразно!

0
задан 12 June 2019 в 23:44

1 ответ

Я нашел решение здесь с небольшими изменениями:

https://github.com/charmed-kubernetes/bundle/wiki/Deploying-on-LXD#the-profile

На машине, на которой у меня установлены LXD, я изменил профиль на «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

Затем я применил этот профиль к своему LXC:

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

Вы можете получить 'container-name', запустив: $ lxc list

Затем я перезапустил все контейнеры:

$sudo lxc restart --all

Теперь все узлы готовы:

$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

0
ответ дан 12 June 2019 в 23:44

Другие вопросы по тегам:

Похожие вопросы: