Kubernetes Cockpit username and password are incorrect

3/30/2016

I am working with Kubernetes tutorial and deploying the cluster locally with Vagrant.

After the vagrant machine finishes its loading, I get the following outout:

Kubernetes cluster is running.
The master is running at:
https://10.245.1.2
Administer and visualize its resources using Cockpit:
 https://10.245.1.2:9090
For more information on Cockpit, visit http://cockpit-project.org
The user name and password to use is located in /Users/me/.kube/config

When i go to https://10.245.1.2:9090 i see the login fedora screen. I do the following:

./cluster/kubectl.sh config view
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: REDACTED
    server: https://10.245.1.2
  name: vagrant
contexts:
- context:
  cluster: vagrant
    user: vagrant
  name: vagrant
current-context: vagrant
kind: Config
preferences: {}
users:
- name: vagrant
  user:
    client-certificate-data: REDACTED
    client-key-data: REDACTED
    password: 9r5V2B2wn6oeaciX
    username: admin

but the username and password are incorrect.

how am i supposed to connect to the cockpit?

Thanks

-- Gleeb
cockpit
kubernetes

2 Answers

3/30/2016

My guess is you don't use the right context for kubectl.

Try the existing username+password from your config file /Users/me/.kube/config or set up the context correctly.

See kubectl config for this issue.

Otherwise you could try this Vagrant tutorial: Kubernetes on CoreOS/Vagrant

-- DW.futuretec
Source: StackOverflow

3/31/2016

The username and password in the kubeconfig file are used to authenticate to the Kubernetes apiserver running in your cluster. The authentication for Cockpit is entirely separate.

According to the vagrant setup scripts, you should log into Cockpit as the user vagrant with the password vagrant.

-- Robert Bailey
Source: StackOverflow