Kubernetes API authentication

0 votes

I’m able to create a service using the command kubectl create, I’m also able to access is on the API in my browser.

It then prompts for authentication and credentials.

I got the credentials using the following command

kubectl config view --minify

The API then shows:

  "paths": [

However, when I try to do anything on the kubernetes cluster (Install Helm Tiller for example), it gives me: Kubernetes error: Unauthorized

Sep 3, 2018 in Kubernetes by Hannah
• 18,570 points

1 answer to this question.

0 votes

Best way to retrieve the token is:

kubectl get secrets

To list the secrets


kubectl describe secret SECRET_NAME

To retrieve the token

answered Sep 3, 2018 by Kalgi
• 52,370 points

Related Questions In Kubernetes

0 votes
1 answer

Not able to access kubernetes api from a pod in azure

Follow these steps Add --bind-address= option to the line https://github.com/kubernetes/kubernetes/blob/v1.2.0/docs/getting-started-guides/coreos/azure/cloud_config_templates/kubernetes-cluster-main-nodes-template.yml#L218  Created ...READ MORE

answered Aug 30, 2018 in Kubernetes by Kalgi
• 52,370 points
0 votes
3 answers

Request Kubernetes API server

Create a api wrapper. This way you ...READ MORE

answered Aug 31, 2018 in Kubernetes by Hannah
• 18,570 points
+1 vote
4 answers

Kubernetes- HTTPS API return `Unauthorized`

One way to do this is by ...READ MORE

answered Sep 5, 2018 in Kubernetes by u_told_me_to
0 votes
1 answer

Kubernetes - Job scheduling API

You will find the CronJobresource in the batch/v1beta1 API group. ...READ MORE

answered Sep 17, 2018 in Kubernetes by Kalgi
• 52,370 points
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 12, 2019 in Kubernetes by Kalgi
• 52,370 points

reshown Apr 12, 2019 by Kalgi 3,584 views
0 votes
2 answers

Access Kubernetes API using minKube

Try these commands: kubectl proxy --port=8080 You can then ...READ MORE

answered Aug 28, 2018 in Kubernetes by Hannah
• 18,570 points
0 votes
2 answers

Access Kubernetes api from within a pod container

wget version: KUBE_TOKEN=$(</var/run/secrets/kubernetes.io/serviceaccount/token) wget -vO- ...READ MORE

answered Aug 29, 2018 in Kubernetes by Nilesh
• 7,040 points