k3s-on-pi icon indicating copy to clipboard operation
k3s-on-pi copied to clipboard

netplan-apply.sh not running on startup

Open mgagliardo91 opened this issue 2 years ago • 1 comments

First and foremost, this is awesome and I really appreciate you publishing the steps to repro.

I am working to reproduce the README and try and get this setup locally on three K8s. I am not able to reproduce getting the netplan-apply.sh script working on startup:

  1. It appears we may need a netplan generate first in order to convert the plan over
  2. Adding the netplan-apply.sh script to the /etc/init.d with correct permissions still doesn't seem to get it to run on startup. Looking online it seems like it may have to be updated/ran against update-rc.d. Was there another step to get that working?

mgagliardo91 avatar Oct 27 '21 20:10 mgagliardo91

Thanks for using this guide @mgagliardo91 !

  1. I don't think you need to run netplan generate based on this from the manpage: You will not normally need to run this directly as it is run by netplan apply, netplan try, or at boot.
  2. My netplan-apply.sh script left some breadcrumbs to https://askubuntu.com/questions/156771/run-a-script-only-at-the-very-first-boot. It looks like I just followed the top answer there. I'm fairly certain this worked. for me, but it's possible something changed or I documented it incorrectly. Netplan is where I spent the most time trying to get bootstrapping right :).

What version of Ubuntu are you using? It looks like I used 20.04.1. I have one spare Pi that I can try to reproduce this on as well.

jeffspahr avatar Oct 28 '21 00:10 jeffspahr