Argon admn token

I have been trying to get the admin panel to work while using a secure argon pass in k3s but I keep getting invalid token. I tried with “password” as the token and it worked fine. I read the page about how to use the argon password but I must be doing something wrong.

I made an Arogn2 key with this command(I will generate a new pass):

ubuntu@ansible:~$ echo -n “gajrisdgsukgryetpihkiasauhsmlmjcfssrlzfn” | argon2 “$(openssl rand -base64 32)” -e -id -k 19456 -t 2 -p 1| sed ‘s#$#$$#g’

$$argon2id$$v=19$$m=19456,t=2,p=1$$cEIxM0tiTlg4U3grZThuSDdYc09nWHdoVHhiODNUTlh0TzU4cEltNkFWST0$$2eTg81VnfJHsXmBR45vCx/E8c0ukgLwmkDzYeU3/aoo

because I added the " sed 's#$#$$#g" at the end the output should have been formatted correctly and I pasted the output into the ADMIN_TOKEN value.

Please tell me what I am doing wrong.

Also extra points if anyone knows how to make /admin only accessible from a local ip in traefik on k3s?

I’m not sure K3s/K8s needs that format actually.
It’s docker/docker-compose which needs this format else it will substitute $ for variables. Which is, as far as i know, not something done by default for K8s environments.

interesting I guess ill look into that, I am very new to kubernetes, thanks.