# Unable to create admin user - Kubernetes Mender Deployment

**URL:** https://hub.mender.io/t/unable-to-create-admin-user-kubernetes-mender-deployment/5325
**Category:** General Discussions
**Created:** [October 17, 2022, 8:14pm UTC](https://hub.mender.io/t/unable-to-create-admin-user-kubernetes-mender-deployment/5325 "2022-10-17T20:14:22Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![stumarr](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/stumarr/32/1752_2.png) [@stumarr](https://hub.mender.io/u/stumarr)
#### Post date: [October 17, 2022, 8:14pm UTC](https://hub.mender.io/t/unable-to-create-admin-user-kubernetes-mender-deployment/5325/1 "2022-10-17T20:14:22Z")

</div>

Following the Mender documentation for a Kubernetes deployment…this step isn’t working for me. I enter the credentials and it just refreshes the login screen but never logs in. Is there a pod that I need to restart?

![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/4/4b25f5ac20e6da66de879eebaf286871c53fd357.png)

Create the Admin User  
USERADM\_POD=$(kubectl get pod -l ‘[app.kubernetes.io/name=useradm](http://app.kubernetes.io/name=useradm)’ -o name | head -1)  
kubectl exec $USERADM\_POD – useradm create-user --username “[demo@mender.io](mailto:demo@mender.io)” --password “demodemo”

---

<div class="post-metadata">

### Author: ![robgio](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/robgio/32/1760_2.png) [@robgio](https://hub.mender.io/u/robgio)
#### Post date: [October 19, 2022, 6:51am UTC](https://hub.mender.io/t/unable-to-create-admin-user-kubernetes-mender-deployment/5325/2 "2022-10-19T06:51:09Z")

</div>

Hello @stumarr, what Kubernetes distribution are you using? And from operating system are you creating the deployment from the documentation?  
I’m assuming you installed Mender 3.4, am I right?

Thanks

---

<div class="post-metadata">

### Author: ![stumarr](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/stumarr/32/1752_2.png) [@stumarr](https://hub.mender.io/u/stumarr)
#### Post date: [October 19, 2022, 12:16pm UTC](https://hub.mender.io/t/unable-to-create-admin-user-kubernetes-mender-deployment/5325/3 "2022-10-19T12:16:54Z")

</div>

Ubuntu 22.04  
k3s version v1.24.6+k3s1 (a8e0c66d)  
go version go1.18.6  
mender 3.4.0

---

<div class="post-metadata">

### Author: ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)
#### Post date: [October 20, 2022, 7:07am UTC](https://hub.mender.io/t/unable-to-create-admin-user-kubernetes-mender-deployment/5325/4 "2022-10-20T07:07:25Z")

</div>

Hi @stumarr,

Thanks for getting in touch! We have confirmed the problem and are tracking it at [[MEN-5977] Can't login to Mender when installing 3.4.0 from helm chart - Northern.tech AS](https://tracker.mender.io/browse/MEN-5977).

Greetz,  
Josef

---

<div class="post-metadata">

### Author: ![stumarr](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/stumarr/32/1752_2.png) [@stumarr](https://hub.mender.io/u/stumarr)
#### Post date: [October 25, 2022, 12:46pm UTC](https://hub.mender.io/t/unable-to-create-admin-user-kubernetes-mender-deployment/5325/5 "2022-10-25T12:46:40Z")

</div>

Hi Josef,

Any update on this?

Thanks,

stu

---

<div class="post-metadata">

### Author: ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://hub.mender.io/u/peter)
#### Post date: [October 26, 2022, 7:40am UTC](https://hub.mender.io/t/unable-to-create-admin-user-kubernetes-mender-deployment/5325/6 "2022-10-26T07:40:29Z")

</div>

Hello @stumarr

thank you for using Mender.  
could you please verify, that you are accessing the Mender Web UI via _https_://your-server-url ? (as opposed to [http://your-server-url](http://your-server-url))

best regards,  
peter

---

<div class="post-metadata">

### Author: ![stumarr](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/stumarr/32/1752_2.png) [@stumarr](https://hub.mender.io/u/stumarr)
#### Post date: [October 26, 2022, 12:50pm UTC](https://hub.mender.io/t/unable-to-create-admin-user-kubernetes-mender-deployment/5325/7 "2022-10-26T12:50:28Z")

</div>

That was it. How come both http and https resolve?  
Thank you,

stu

---

<div class="post-metadata">

### Author: ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://hub.mender.io/u/peter)
#### Post date: [October 26, 2022, 1:05pm UTC](https://hub.mender.io/t/unable-to-create-admin-user-kubernetes-mender-deployment/5325/8 "2022-10-26T13:05:59Z")

</div>

great to hear you got it working.  
I think you can control what ports are open in the values of the helm chart, or otherwise with any ingress you use for the k8s. I am not familiar with your setup, but there are several ways of doing it, depending on what you prefer.

best regards,  
peter

---

<div class="post-metadata">

### Author: ![stumarr](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/stumarr/32/1752_2.png) [@stumarr](https://hub.mender.io/u/stumarr)
#### Post date: [October 26, 2022, 1:18pm UTC](https://hub.mender.io/t/unable-to-create-admin-user-kubernetes-mender-deployment/5325/9 "2022-10-26T13:18:44Z")

</div>

This is just a test environment at the moment, but when we deploy our production environment we will be using k3s if we deploy it on-prem (or in the cloud).  
Thank you for the guidance and I’ll keep you posted on any other issues we encounter.

stu

---

<div class="post-metadata">

### Author: ![stumarr](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/stumarr/32/1752_2.png) [@stumarr](https://hub.mender.io/u/stumarr)
#### Post date: [November 1, 2022, 4:15pm UTC](https://hub.mender.io/t/unable-to-create-admin-user-kubernetes-mender-deployment/5325/10 "2022-11-01T16:15:35Z")

</div>

Hi Peter,

It turns out that this is still an issue. It was working sporadically, but now I can’t login no matter what I do. I’ve rebuilt the server. Used different MENDER\_SERVER\_DOMAINs, still the same issue. I login with the credentials I’ve created and it just bounces me back to the login screen.

Thanks,

stu

---

<div class="post-metadata">

### Author: ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://hub.mender.io/u/peter)
#### Post date: [November 4, 2022, 3:30pm UTC](https://hub.mender.io/t/unable-to-create-admin-user-kubernetes-mender-deployment/5325/11 "2022-11-04T15:30:52Z")

</div>

Hey stu,

we need to do two things:

1. get the complete logs from useradm pod, from the restart to the moment you see a failed login

2. verify that the keys in the pod can be read.

as for 1: could you gather the logs for me?  
number 2 needs one more action: we need a busy box executable in the pod. could you run something in those lines:

```auto
docker cp `docker run -d --entrypoint=busybox busybox sleep 255`:/bin/busybox /tmp/
kubectl cp /tmp/busybox $USERADM_POD:/tmp/
kubectl exec $USERADM_POD – /tmp/busybox ls -alR /etc/useradm
kubectl exec $USERADM_POD – /tmp/busybox cat /etc/useradm/rsa/private.pem

```

and send me the output removing the actual contents of the `private.pem` file?

best regards,  
peter
