I've got ip address of kubernetes master from kubectl cluster-info. I've appended /ui and opened on browser. Now it asks username/password, basic auth. Where to get them?
@Zhomart try kubectl config viewwill show the user/password you are using when using the kubectl tool.
That's great! Thanks @cescoferraro
@cescoferraro thanks!
why my ui need not password? how did you deploy it?@Zhomart
@chowyu08 It depends on the cluster configuration. If you are using certificates then no user/password is needed. I think it is required if authorization mode is set to i.e. ABAC
@floreks does set KUBE_APISERVER_OPTS="--authorization-mode=ABAC " ?
Yes, I think it is API server parameter. It is described better in here: http://kubernetes.io/docs/admin/authorization/
@chowyu08 I'm using Google Container Engine.
I have deployed kubernetes everywhere on vsphere. Now i would like to ssh into the master-node and the minion nodes. I have this client-certificate-data and client-key-data. How do I use these to ssh into the nodes?
Currently I proxy command: $ kubectl proxy. It opens local port, I append /ui at the end of the url.
$ kubectl proxy
Starting to serve on 127.0.0.1:8001
$ open http://127.0.0.1:8001/ui
For people just finding this thread for the first time, note that if you're not a project owner within a GCP project, you won't be able to make cluster admin role bindings.
For my local VM test, I have following config.
Where is the password? I tried admin / {emptyPassword} did not work.
$ microk8s.kubectl config view
apiVersion: v1
clusters:
- cluster:
server: http://127.0.0.1:8080
name: microk8s-cluster
contexts:
- context:
cluster: microk8s-cluster
user: admin
name: microk8s
current-context: microk8s
kind: Config
preferences: {}
users:
- name: admin
user:
username: admin
@reyou I had the same problem. How did you solve it?
@XuHaoIgeneral I run following command:
$ kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}')
and used token to login. Also if you are on your local. there is a skip button on login page, so you can just skip login screen.
Thanks @reyou, this was the thing that worked for me!
Most helpful comment
@Zhomart try
kubectl config viewwill show the user/password you are using when using the kubectl tool.