Butane config.bu via nginx¶
Step 2.3 — Install nginx and the butane CLI on the kubemaster, render config.bu, run butane to produce config.ign, and serve both over HTTP. This is useful when provisioning Fedora CoreOS (or other flows) that fetch Ignition over your LAN. The cluster does not need to be initialized yet: you only need the kubemaster VM from Step 2.1 — Prepare the kubemaster node reachable by Ansible (you can run this step before or after Step 2.2 — Kubeadm init (Flannel)).
What gets created¶
/var/www/html/config.bu— minimal FCOS-style Butane (variant/version,passwd.usersforcore). Ifssh_authorized_keyis set (from ansible-vault viagroup_vars/all/vault.yml, seeiac/ansible/README.md; Step 2.1), or you passbutane_ssh_authorized_key, the key is embedded underssh_authorized_keysforcore.- If all three join variables below are non-empty (
kubeadm_join_serverinhosts.yml; token and hash from vault; or passed with-e), the Butane file also defines akubeadm-join.servicesystemd oneshot that runskubeadm joinafternetwork-online.target: kubeadm_join_server— control plane API address ashost:port(for example192.168.1.10:6443).kubeadm_join_token— bootstrap token fromkubeadm token create/kubeadm initoutput.kubeadm_join_discovery_token_ca_cert_hash— CA cert hash for--discovery-token-ca-cert-hash(hex or fullsha256:form; asha256:prefix is added automatically if you omit it).
The node image must already include kubeadm, kubelet, and a container runtime (for example the same Kubernetes stack as Step 2.1); FCOS may need those supplied via rpm-ostree / extensions before kubeadm join can succeed.
- An nginx
serveron port 80 (default) serving that document root, withtext/plainfor/config.buandapplication/vnd.coreos.ignition+jsonfor/config.ign. - The
butanepackage (override withbutane_packagein the role defaults). The role runsbutane /var/www/html/config.bu -o /var/www/html/config.ignon the kubemaster wheneverconfig.buchanges orconfig.ignis missing.
Ansible role: iac/ansible/roles/kubemaster_nginx_config_bu.
Run the playbook¶
From iac/ansible (same inventory as Step 2.1):
Optional: pass a public key explicitly:
ansible-playbook playbooks/kubemaster-nginx-config-bu.yml \
-e 'butane_ssh_authorized_key="ssh-ed25519 AAAA... you@host"'
Verify¶
Set KUBEMASTER_IP to your kubemaster’s reachable address, for example:
From any host that can reach that address:
You can compile config.bu to Ignition yourself with the Butane documentation; the role already writes /var/www/html/config.ign on the kubemaster for you.
What happens next¶
- Continue with Step 3.1 — Create kubeworker VMs if you are creating libvirt workers, or Step 3 — Platform layer (Flux) once
kubectlis available.
Check config.ign was generated (curl)¶
After the playbook finishes, with KUBEMASTER_IP set as in Verify, fetch the Ignition JSON and print it with jq (this fails if the body is not valid JSON):