I was helping a colleague grab the latest ignition files for his OpenShift Container Platform workers.
- Connect to the bastion
❯ ssh root@<hostname>
- List the master nodes and select a master node
❯ oc get nodes -lnode-role.kubernetes.io/master=
NAME STATUS ROLES AGE VERSION
master-0.ocp-power.xyz Ready control-plane,master 5d19h v1.25.2+7dab57f
master-1.ocp-power.xyz Ready control-plane,master 5d19h v1.25.2+7dab57f
master-2.ocp-power.xyz Ready control-plane,master 5d19h v1.25.2+7dab57f
- Get the IP address
❯ oc get nodes master-2.ocp-power.xyz -o json | jq -r .status.addresses
[
{
"address": "192.168.100.240",
"type": "InternalIP"
},
{
"address": "master-2.ocp-power.xyz",
"type": "Hostname"
}
]
- The Machine Config Server has the latest
igntion
file
❯ curl https://192.168.100.240:22623/config/worker -k -H "Accept: application/vnd.coreos.ignition+json;version=3.2.0" | jq -r . > worker-$(date +%Y-%m-%d).ign
worker
can be replaced with master
or any other MachineConfigPool
The machine-config-server is hosted on each of the master nodes and the bootstrap node.
Note, this makes it download ignition version 3.2.0.
- Download the ignition file
❯ scp root@<hostname>:'~'/worker-$(date +%Y-%m-%d).ign .
worker-2023-03-02.ign 100% 357KB 249.3KB/s 00:01
You can use this file for your work with worker ignition.