mirror of
https://github.com/apricote/home-cloud.git
synced 2026-02-09 03:07:01 +00:00
deploy with k3s
This commit is contained in:
parent
0f08cfb0d2
commit
2863062e44
26 changed files with 456 additions and 207 deletions
21
k3s_cluster/files/k3s-install.sh
Normal file
21
k3s_cluster/files/k3s-install.sh
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
until ( \
|
||||
curl -sfL https://get.k3s.io | \
|
||||
INSTALL_K3S_VERSION='v${install_k3s_version}' \
|
||||
K3S_CLUSTER_SECRET='${k3s_cluster_secret}' \
|
||||
INSTALL_K3S_EXEC='%{ if is_k3s_server } ${k3s_tls_san} %{ endif }' \
|
||||
%{ if !is_k3s_server } K3S_URL='https://${k3s_url}:6443'%{ endif } \
|
||||
sh - \
|
||||
); do
|
||||
echo 'k3s did not install correctly'
|
||||
sleep 2
|
||||
done
|
||||
|
||||
%{ if is_k3s_server }
|
||||
until kubectl get pods -A | grep 'Running';
|
||||
do
|
||||
echo 'Waiting for k3s startup'
|
||||
sleep 5
|
||||
done
|
||||
%{ endif }
|
||||
Loading…
Add table
Add a link
Reference in a new issue