17

I've installed a kubernetes cluster (using Google's Container Engine) and I noticed a service listening on port 443 on the master server. Tried to access it but it requires username and password, so any ideas what these credentials are?

5 Answers 5

34

You can read the cluster config using kubectl. This will contain the username and password for the UI.

kubectl config view
3
  • This was a fast and easy way for me to get 'em! Thanks! Nov 14, 2015 at 20:58
  • 2
    Ver 1.3 doesn't show username and password with this command @Oscar Barrett.
    – rutulPatel
    Aug 25, 2016 at 20:56
  • 4
    My config had an access token instead of a username and password. To find my username/password, I had to go to console.cloud.google.com/kubernetes, choose my cluster and click "Show credentials"
    – Sushant
    Oct 9, 2016 at 22:42
13

As of April 29 use:

gcloud container clusters describe [clustername]

This will give you some YAML (see here) containing also the username and password.

7

The user/password are stored in the API.

If you do:

gcloud preview container --zone <zone> clusters list

You should be able to see the user name and password for your cluster.

Note that the HTTPS cert that it uses is currently signed by an internal CA (stored in your home directory) so for a web browser, you will need to manually accept the certificate. We're working on making this more clean.

3
  • Thank you for that. I only got "Welcome to Kubernetes", any ideas what this service doing? I'm looking to somehow see some statistics about my cluster. I tried to deploy the UX pods but it is not working Nov 14, 2014 at 18:20
  • The exposed port is running the Kubernetes master service, which doesn't currently have a user interface. It is meant to be accessed with command line tools like gcloud, e.g. 'gcloud preview container pods create <name>' Nov 19, 2014 at 20:04
  • 2
    No longer the correct answer; see Oscar's answer below
    – A.Wan
    Feb 2, 2016 at 21:47
4

You can also type

$ kubectl proxy

which will serve up the UI at http://localhost:8001/ui

1
  • 1
    This will not work on a remote master. It's also not very secure and should not be used in production. Feb 27, 2019 at 3:12
2

Use the below command to find the Kubernetes auto-generated password.

$Kubectl config view --minify

2
  • It sounds like you are asking a question. If so, that should be its own question, and you could make a separate post for it. And if not, could you edit your answer to make the last line a little clearer?
    – Antimony
    Aug 23, 2017 at 23:48
  • thanks @Antimony, i have edited my comment and created another question. I will be thankful if you could help on this too. stackoverflow.com/questions/46038658/… Sep 4, 2017 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.