minishift: Cannot login to minishift as admin
General information
-
Minishift version: minishift v1.14.0+1ec5877
-
OS: Linux
-
Hypervisor: VirtualBox
Steps to reproduce
- minishift start
- oc login -u system:admin
Expected
login as admin
Actual
Does not login
oc login -u system:admin Authentication required for https://192.168.99.100:8443 (openshift) Username: system:admin
Workaround
https://github.com/minishift/minishift/issues/2107#issuecomment-396160071
Here is the work around:
$ minishift addon apply admin-user
$ oc login -u admin
Authentication required for https://192.168.64.2:8443 (openshift)
Username: admin
Password: admin
Login successful.
Or
$ minishift addon list
- admin-user : enabled P(0)
$ minishift start
$ oc login -u admin
Authentication required for https://192.168.64.2:8443 (openshift)
Username: admin
Password: admin
Login successful.
You have access to the following projects and can switch between them with 'oc project <projectname>':
default
kube-public
kube-system
* myproject
openshift
openshift-infra
openshift-node
openshift-web-console
Using project "myproject".
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 8
- Comments: 55 (21 by maintainers)
Commits related to this issue
- Bump default version of minishift Never versions of minishift have some bugfixes + new features. ATM, latest version is v1.18.0 but there is and issue with login to minishift as system:admin. https:/... — committed to lslebodn/contra-env-setup by deleted user 6 years ago
- Bump default version of minishift Never versions of minishift have some bugfixes + new features. ATM, latest version is v1.18.0 but there is and issue with login to minishift as system:admin. https:/... — committed to lslebodn/contra-env-setup by deleted user 6 years ago
- Bump default version of minishift Never versions of minishift have some bugfixes + new features. ATM, latest version is v1.18.0 but there is and issue with login to minishift as system:admin. https:/... — committed to lslebodn/contra-env-setup by deleted user 6 years ago
- Bump default version of minishift Never versions of minishift have some bugfixes + new features. ATM, latest version is v1.18.0 but there is and issue with login to minishift as system:admin. https:/... — committed to lslebodn/contra-env-setup by deleted user 6 years ago
- Bump default version of minishift Never versions of minishift have some bugfixes + new features. ATM, latest version is v1.18.0 but there is and issue with login to minishift as system:admin. https:/... — committed to lslebodn/contra-env-setup by deleted user 6 years ago
- Issue #2107 Fix system:admin login for openshift cluster — committed to praveenkumar/minishift by praveenkumar 6 years ago
- Issue #2107 Fix system:admin login for openshift cluster — committed to praveenkumar/minishift by praveenkumar 6 years ago
- Issue #2107 Fix system:admin login for openshift cluster — committed to praveenkumar/minishift by praveenkumar 6 years ago
- Issue #2107 Fix system:admin login for openshift cluster — committed to praveenkumar/minishift by praveenkumar 6 years ago
- Issue #2107 Fix system:admin login for openshift cluster — committed to praveenkumar/minishift by praveenkumar 6 years ago
- Issue #2107 Fix system:admin login for openshift cluster — committed to praveenkumar/minishift by praveenkumar 6 years ago
- Issue #2107 Fix system:admin login for openshift cluster — committed to minishift/minishift by praveenkumar 6 years ago
- Issue #2107 Fix system:admin login for openshift cluster — committed to rhnvrm/minishift by praveenkumar 6 years ago
A workaround is:
then paste it to your ~/.kube/config
@carbonin you should try to use admin user addon and then you can able to login as
adminwith passwordadminHere is the work around:
Or
Hello all!
As a workaround for this issue I connected to the openshift-origin pod and added the cluster-admin user role to the standard “developer” user. This effectively turns developer into cluster admin with full access to infrastructure projects/namespaces.
with minishift VM up and running:
This is also persistent, so the policy config does not neet to be reapplied upon minishift restart.
edit:/ below procedure from @Valien is a simpler one
@nilarte Yes, we have done a release as users are facing a lot of issue because of this. It is released as part of https://github.com/minishift/minishift/releases/tag/v1.20.0. cc @gbraad
So saw this on another issue linked to the system:admin error. You need to run the following to get the admin-use addon to work properly:
minishift addon enable admin-userminishift addon apply admin-userOnce done you should be able to login as admin/admin and see all the cluster projects.
Thanks for the workaround as I was bashing my head against the desk with the system:admin bug.
Switching to minishift from the normal
oc cluster updocker containers since Docker broke the proxy issues.All of us used to be able to login as
system:adminpreviously. They have decided to take that power away from us now, and hence this issue was opened. Till this issue is fixed or a conclusion is reached, the workaround to become an admin of your cluster is to enable theadmin-useraddon, and then login as user: admin and pass: admin. It won’t give you our favoritesystem:adminuser, but give theadminuser admin rights. You’ll be able to see the system projects after enabling theadmin-useraddon. Any other user, is well, just any other user.I am running into this issue too. I see a difference in
~/.kube/configbetween v1.17.0+f974f0c and v1.18.0+756b128. With v1.17, after doingminishift start, if I check~/.kube/configI see that it has the following section for users:If I then delete
~/.kube/and~/.minishift/and tryminishift startwith v1.18, I see the following in~/.kube/config:The
system:adminuser is missing which I think is the cause of the issue. Was this change done on purpose between releases or is it a regression?@ibaboo as per logs you are using
kvmif you want to use the VirtualBox then--vm-driver virtualBoxis needed as start option.I am using Virtual Box
@ibabooI am not able to reproduce the issue you are facing. What I m suspecting, in your case there might be old oc reference present in the path. Please try these steps