JamesTurland / JimsGarage

Homelab Goodies
2.16k stars 482 forks source link

kubectl apply $HOME/ipAddressPool.yaml #44

Open itsalljustdata opened 10 months ago

itsalljustdata commented 10 months ago

If you're not running your script from $HOME, then the kubectl apply ipAddressPool.yaml was failing (no path for the YAML file in the command).

Ricardowec51 commented 10 months ago

I did run the script from $HOME, probably it shifted to root somwhere during the executuion. or my user is in sudo group.

Also, i run it in PROXMOX and in my VCENTER as well. Both same result.

Saw your update. Wil try in Vmware in a couple of hours and report

itsalljustdata commented 10 months ago

I was running from a folder other than $HOME (I cloned the whole repo and ran from the repo folder). The script generates the YAML and sticks it in $HOME. Therefore when it tries to kubectl with no path it cracks the shits because the file's not in the current working folder.

As a side note, i reckon starting the instructions with a repo clone and then going from there (rather than grabbing files ad-hoc) is better - it means that we can alter files as we need to on our copy without having to butcher the scripts themselves