I was trying to see how Ignition is in the Kubernetes world. I’m simply just trying to backup the path /usr/local/bin/ignition/data. But I can not get it to work. If I remove the mount path the container will at least run. If I leave it as is the pod runs but Ignition never starts up. Wondering if there’s a command that needs to be run or something?
Creating init.properties file
Creating gateway.xml
cp: cannot stat 'data/gateway.xml_clean': No such file or directory
Adding gateway.publicAddress.autoDetect=false to gateway.xml
failed to load external entity "data/gateway.xml"
Adding gateway.publicAddress.address=0.0.0.0 to gateway.xml
failed to load external entity "data/gateway.xml"
Adding gateway.publicAddress.httpPort=8088 to gateway.xml
failed to load external entity "data/gateway.xml"
Adding gateway.publicAddress.httpsPort=8043 to gateway.xml
failed to load external entity "data/gateway.xml"
Enabling arg pass through
Disabling PID file check
Starting Ignition gateway
Following wrapper.log
Right now I think this will likely not work [on the official image at this time], for some of the reasons I describe in my unofficial image docs at ALTERNATIVE: How to persist Gateway data. You might have a go at subbing for kcollins/ignition:8.1 and pointing your volume target at /data. Let me know if that works out for ya…
@mazhar, do keep in mind that with the official image there is no special handling for mounts at /data and thusly, your gateway state will not be persisted.
@Kevin.Collins Understood. ‘kcollins/ignition’ apparently needs initialization unlike official image, @hodgins.e can you share how you accomplished the initialization?
Just augmenting this thread for those that find it (since I had a couple questions on this topic, recently)… In K8s, you can leverage initContainers to seed the data volume prior to initial launch of the Gateway container [in the pod].
Here is an example deployment that leverages an init container to seed the data volume with files from the image:
This is designed to be run from a folder on your host system with a fresh (and empty, initially) ignition-data subfolder. I use envsubst to substitute the current working directory. So you could deploy this with, for example:
Okay.. You shouldn't have any issue with EBS volumes. Feel free to share your YAML, but ultimately, I'd recommend looking at that GH repo I referenced above as a better baseline.
EDIT: wrote the above before I saw your most recent reply.. Glad you're up and running!