Add just command to refresh cert
This commit is contained in:
6
justfile
6
justfile
@@ -44,11 +44,11 @@ refresh-client-cert:
|
||||
yq -r .machine.ca.crt controlplane.yaml | base64 -d > ca.crt
|
||||
yq -r .machine.ca.key controlplane.yaml | base64 -d > ca.key
|
||||
talosctl gen key --name admin
|
||||
talosctl gen csr --key admin.key --ip 127.0.0.1
|
||||
talosctl gen crt --ca ca --csr admin.csr --name admin
|
||||
talosctl gen csr --key admin.key --ip 127.0.0.1
|
||||
talosctl gen crt --ca ca --csr admin.csr --name admin --hours 8760
|
||||
yq -i '.contexts.fog.ca = "'"$(base64 -w0 ca.crt)"\
|
||||
'" | .contexts.fog.crt = "'"$(base64 -w0 admin.crt)"\
|
||||
'" | .contexts.fog.key = "'"$(base64 -w0 admin.key)"'"' \
|
||||
.config/talosconfig
|
||||
|
||||
talosctl kubeconfig .config/kubeconfig -n 192.168.1.43
|
||||
talosctl kubeconfig .config/kubeconfig -n 192.168.1.43
|
||||
|
||||
Reference in New Issue
Block a user