mirror of
https://github.com/outbackdingo/matchbox.git
synced 2026-01-27 10:19:35 +00:00
examples/ignition/bootkube: Wrap bootkube in systemd service
* Start `bootkube start` via systemctl, don't require a persistent SSH connection during the script run
This commit is contained in:
@@ -63,10 +63,11 @@ Secure copy the `kubeconfig` to `/etc/kubernetes/kubeconfig` on **every** node w
|
||||
Secure copy the `bootkube` generated assets to any controller node and run `bootkube-start`.
|
||||
|
||||
scp -r assets core@node1.example.com:/home/core/assets
|
||||
ssh core@node1.example.com 'sudo ./bootkube-start'
|
||||
ssh core@node1.example.com 'sudo systemctl start bootkube'
|
||||
|
||||
Watch the temporary control plane logs until the scheduled kubelet takes over in place of the on-host kubelet.
|
||||
Optionally watch the Kubernetes control plane bootstrapping with the bootkube temporary api-server. You will see quite a bit of output.
|
||||
|
||||
$ ssh core@node1.example.com 'journalctl -f -u bootkube'
|
||||
[ 299.241291] bootkube[5]: Pod Status: kube-api-checkpoint Running
|
||||
[ 299.241618] bootkube[5]: Pod Status: kube-apiserver Running
|
||||
[ 299.241804] bootkube[5]: Pod Status: kube-scheduler Running
|
||||
|
||||
@@ -77,7 +77,13 @@ systemd:
|
||||
RestartSec=10
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
- name: bootkube.service
|
||||
contents: |
|
||||
[Unit]
|
||||
Description=Bootstrap a Kubernetes control plane with a temp api-server
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/home/core/bootkube-start
|
||||
storage:
|
||||
{{ if index . "pxe" }}
|
||||
disks:
|
||||
|
||||
Reference in New Issue
Block a user