It shouldn't do that. Those files are installed by kubernetes-worker, not by flannel. And kubernetes-worker doesn't know it's happening, so those files never get re-installed when the new flannel subordinate is deployed.
I think if we remove those three lines, that should fix the issue.
Looks like the flannel charm is removing files from /opt/cni/bin/ during its stop hook: https:/ /github. com/charmed- kubernetes/ charm-flannel/ blob/f79f180a4f 8c3f19652f77596 537cd9ca359b402 /reactive/ flannel. py#L312- L314
It shouldn't do that. Those files are installed by kubernetes-worker, not by flannel. And kubernetes-worker doesn't know it's happening, so those files never get re-installed when the new flannel subordinate is deployed.
I think if we remove those three lines, that should fix the issue.