2024-10-03 17:38:08 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-10-04 00:00:02 +02:00
|
|
|
kubectl -n staging get secret k3s-seyshiro-de-tls -o jsonpath='{.data.tls\.crt}' | base64 -d >staging_tls.crt
|
|
|
|
kubectl -n staging get secret k3s-seyshiro-de-tls -o jsonpath='{.data.tls\.key}' | base64 -d >staging_tls.key
|
2024-10-03 17:38:08 +02:00
|
|
|
|
|
|
|
kubectl -n production get secret k3s-seyshiro-de-tls -o jsonpath='{.data.tls\.crt}' | base64 -d >production_tls.crt
|
|
|
|
kubectl -n production get secret k3s-seyshiro-de-tls -o jsonpath='{.data.tls\.key}' | base64 -d >production_tls.key
|
|
|
|
|
|
|
|
scp ./{production,staging}_tls.{crt,key} k3s-loadbalancer:~
|
2024-10-04 00:00:02 +02:00
|
|
|
rm ./{production,staging}_tls.{crt,key}
|
2024-10-03 17:38:08 +02:00
|
|
|
|
2024-10-04 00:00:02 +02:00
|
|
|
# on k3s-loadbalancer
|
2024-10-03 17:38:08 +02:00
|
|
|
# chmod 600 ./{production,staging}_tls.{crt,key}
|
2024-10-04 00:00:02 +02:00
|
|
|
# sudo chown root:root ./{production,staging}_tls.{crt,key}
|
2024-10-03 17:38:08 +02:00
|
|
|
# sudo mv ./{production,staging}_tls.{crt,key} /etc/nginx/ssl/
|