fix forgotten user in k3s user creation
fix hard-coded username in k3s user creation
This commit is contained in:
parent
d40150b97a
commit
145cf2e72f
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue