fix forgotten user in k3s user creation

fix hard-coded username in k3s user creation
This commit is contained in:
Niels Kunis 2024-04-13 14:00:18 +02:00
parent d40150b97a
commit 145cf2e72f

View file

@ -45,10 +45,10 @@ spec:
"
echo Creating K8S CSR resource
ssh "$host" "echo \"$k8s_csr\" | k3s kubectl apply -f -"
ssh "root@$host" "echo \"$k8s_csr\" | k3s kubectl apply -f -"
echo Approving K8S CSR
ssh "$host" "k3s kubectl certificate approve $username-csr"
ssh "root@$host" "k3s kubectl certificate approve $username-csr"
echo Retrieving approved certificate
encoded_cert="$(ssh root@"$host" "k3s kubectl get csr $username-csr -o jsonpath='{.status.certificate}'")"
@ -69,7 +69,7 @@ clusters:
contexts:
- context:
cluster: default
user: pim
user: $username
name: default
current-context: default
kind: Config