Questions tagged [kubeconfig]

105 questions
0
votes
0 answers

Kubernetes Java Client getting "Unauthorized 401" response

I'm creating Java API client to connect to a cluster and list the pods,but I'm getting the "Unauthorized" exception every time I try to execute it. Here is my local project: import io.kubernetes.client.openapi.ApiClient; import…
marjan
  • 3
  • 4
0
votes
1 answer

Getting error You must be logged in to the server (the server has asked for the client to provide credentials)

I am getting the following error when trying to use the kubectl command:- error: You must be logged in to the server (the server has asked for the client to provide credentials) i am using the eks and after successfully doing all the activity, i…
0
votes
1 answer

Get hard-coded credentials in GKE kubeconfig

I am currently getting my kubeconfig files for my GKE clusters via export KUBECONFIG= gcloud container clusters get-credentials cluster-name --region=region-name Now I get the config files and I can use them. However, for some…
0
votes
1 answer

set default kubernetes cluster

This is kind of a silly one but, given a number of clusters... How would a user specify one cluster to be set as the default? CURRENT NAME * minikube stage prod Every time I open a new Terminal (macOS), it…
todd_dsm
  • 918
  • 1
  • 14
  • 21
0
votes
1 answer

what is config-mode in kubeconfig file?

I see there is a field "config-mode" in Kubernetes configuration file (kubeconfig). users: - name: myuser user: auth-provider: config: access-token: xxxxx apiserver-id: xxxxx client-id: xxxxx config-mode:…
RMNull
  • 149
  • 3
  • 12
0
votes
1 answer

How do we check kubeconfig token expiry date?

We generate the kubeconfig for kubernetes cluster from a web UI. Some users are complaining that their kubeconfig file is not working. We need to know the expiry date of the token from kubeconfig file. We would want to advise the users to…
P Ekambaram
  • 15,499
  • 7
  • 34
  • 59
0
votes
1 answer

How to delete or stop usage of access token in kubeconfig file?

Kubeconfig file is containing an access token that acts as a bearer token. It also contains an expiry date. Is there a way to delete/stop this access token from being used so that even if the kubeconfig file has the token, it will prompt for a new…
Sneha Dominic
  • 368
  • 2
  • 14
0
votes
1 answer

Microsoft Azure CLI is giving me an access token without a refresh token. How do I get an access token that has a refresh token?

I'm trying to get AKS credentials set up for a gitlab-runner environment. I can get a basic kubeconfig with az aks get-credentials -n mythingname -g myresourcegroup -f kubeconfig but the resulting kubeconfig doesn't have access or refresh…
Martin
  • 11
  • 2
0
votes
0 answers

how to detect the cloud provider by the kubeconfig?

is there a way to detect the cloud provider by the kubeconfig? or maybe use its api? i was thinking to look on the server key on the kubeconfig YAML and pull the type from there? azure have in domain : azmk8s amazon have in domain:…
0
votes
1 answer

K3D Kubeconfig invalid credentials

My Kube is running since almost 6 month, and yet I get Invalid Credentials response while trying to connect to it. It runs on a K3D instance, has access to the root host, as well the 3 containers, LB, agent, server. How can I get this connection…
Jack
  • 184
  • 1
  • 11
0
votes
1 answer

How to add token_id to .kube/config file directly

The official documentation of kubernetes (https://kubernetes.io/docs/reference/access-authn-authz/authentication/) states at some point: "3. Call Kubectl with --token being the id_token OR add tokens to .kube/config" (just search for mentioned…
supertramp
  • 169
  • 1
  • 14
0
votes
1 answer

Reset/remove kubeconfig file user from Kubernetes

Whenever you start a Kubernetes cluster at one of the big clouds (EKS at AWS, GKE at GCP, AKS at Azure, or Kubernetes at Digitalocean), you can generate a kubeconfig file from them, which grants you full access. It is now very nice to work with…
0
votes
1 answer

connect to kubernetes cluster from local machine using kubectl

I have installed a kubernetes cluster on EC2 instances on AWS. 1 master node and 2 worker nodes. Everything works fine when I connect to the master node and issue commands using kubectl. But I want to be able to issue kubectl commands from my local…
Tomas.R
  • 715
  • 2
  • 7
  • 18
0
votes
1 answer

Kubeconfig in Azure

I have an Azure cloud where a Kubernetes cluster was created by me. Besides, in my environment, I have Jenkins running for the pipeline. I need to create a container with React FE in it. I need to describe some kubectl commands with kubeconfig to…
UnicsSol
  • 27
  • 7
0
votes
0 answers

Kops rotates x509 client certificate in kubeconfig

I have a Kops cluster where I want to rotate the client certificate in the kubeconfig. I read and follow https://kops.sigs.k8s.io/operations/rotate-secrets/, but the certificate in the kubeconfig is still valid. I check kops get keypair kubecfg and…
thenewasker
  • 125
  • 2
  • 8