Comment 1 for bug 1903566

Revision history for this message
George Kraft (cynerva) wrote :

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:

juju config kubernetes-worker kubelet-extra-config='{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.

[1]: https://github.com/charmed-kubernetes/layer-kubernetes-master-worker-base/blob/809f06c6f6521be59e21859eaebeccd13f4d8c28/config.yaml#L4
[2]: https://github.com/charmed-kubernetes/layer-kubernetes-master-worker-base/blob/809f06c6f6521be59e21859eaebeccd13f4d8c28/reactive/kubernetes_master_worker_base.py#L78