This will happen any time kubernetes-worker is placed on LXD. The charm normally sets these kernel parameters as part of the charm's sysctl config[1], however on LXD, the sysctl config is simply ignored[2].
A workaround is to configure kubelet with protectKernelDefaults=false:
When you do this, Kubelet will stop protecting kernel defaults and will set the kernel.panic, kernel.panic_on_oops, and vm.overcommit_memory kernel parameters automatically.
This will happen any time kubernetes-worker is placed on LXD. The charm normally sets these kernel parameters as part of the charm's sysctl config[1], however on LXD, the sysctl config is simply ignored[2].
A workaround is to configure kubelet with protectKernelDe faults= false:
juju config kubernetes-worker kubelet- extra-config= '{protectKernel Defaults: false}'
When you do this, Kubelet will stop protecting kernel defaults and will set the kernel.panic, kernel. panic_on_ oops, and vm.overcommit_ memory kernel parameters automatically.
[1]: https:/ /github. com/charmed- kubernetes/ layer-kubernete s-master- worker- base/blob/ 809f06c6f6521be 59e21859eaebecc d13f4d8c28/ config. yaml#L4 /github. com/charmed- kubernetes/ layer-kubernete s-master- worker- base/blob/ 809f06c6f6521be 59e21859eaebecc d13f4d8c28/ reactive/ kubernetes_ master_ worker_ base.py# L78
[2]: https:/