Questions tagged [kubeconfig]
The kubeconfig tag has no usage guidance.
108
questions
0
votes
1
answer
42
views
Spinnaker !ERROR No user named 'my_user/api-kcs-cluster-com:port' exists in your kubeconfig file. when I run 'hal deploy apply' but user is defined?
Hello I'm currently trying to deploy spinnaker by running halyard container via Docker
Here's my Kubeconfig file: /root/.kube/config
apiVersion: v1
clusters:
- cluster:
certificate-authority: /usr/...
0
votes
0
answers
39
views
Pull images from private registry with self sign certificates Kubernetes containerd
I know there are many questions about this and also many answers about how to configure containerd to allow insecure and so on ...
What I do have is a kubeconfig file with admin access to the ...
0
votes
1
answer
42
views
limit applying kustomize overlay to a specific cluster
Is there a way for kustomize to reject applying an overlay if KUBECONFIG is not set to the correct cluster. I'm thinking of creating a shell script that does this, is there a better way?
We apply ...
1
vote
1
answer
44
views
How to deal with URLBlockedUncategorized when trying to connect with kubeconfig file?
I´m currently working on ubuntu linux. I have already implemented minikube and have a config for kubernetes ready:
apiVersion: v1
clusters:
- cluster:
certificate-authority: /home/<user>/....
0
votes
1
answer
43
views
fabric8 Kubernetes Client Config keeps referencing kubeconfig
I am trying to set up a custom Kubernetes Client using the following
Config config = new ConfigBuilder()
.withMasterUrl(eksEndpoint)
.withOauthTokenProvider(authTokenProvider)
....
0
votes
1
answer
82
views
Accessing kubeconfig file from Azure artifacts
I am new to Azure DevOps and have a requirement where AKS cluster is provisioned through terraform which creates two kubeconfig admin & user files in Azure Devops artifacts. Now I have to call ...
0
votes
0
answers
39
views
Kubectl forbidden error with service account & kubeconfig
TL;DR
Kubectl Forbidden error when using a service account with kubeconfig, but not other authentication methods. What could I did wrong ?
Apologies in advance if dupplicate, I couldn't find my ...
0
votes
1
answer
331
views
kubeconfig exec - running a binary to get the path for the command
I currently have something like this in my kubeconfig
exec:
apiVersion: client.authentication.k8s.io/v1
command: PATH_DETERMINED_VIA_BINARY/token_generator
args:
- --...
0
votes
1
answer
84
views
How to operate a Kubernetes cluster on Digitalocean from Python?
the question
I am running a Kubernetes cluster in Digitalocean and I want to connect to it from certain Python app, in order to retrieve information about running services. I am able to setup the ...
1
vote
1
answer
843
views
Github Actions: How to store kubeconfig in github secrets
I have this kubeconfig file
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: ***
server: ***
name: ***
contexts:
- context:
cluster: ***
user: webhook
name: *****
...
5
votes
1
answer
359
views
How to enable TLS verification for C# Kubernetes client without a kubeconfig file?
I want C# code to connect to a K8s cluster and for now just list the namespaces. The following C# code I tried works, and connects to a Kubernetes cluster, but it only works when "SkipTlsVerify = ...
0
votes
0
answers
128
views
gcloud container clusters get-credentials doesn't work through jenkins pipeline shell, works fine on the instance terminal
When i try to run gcloud container clusters get-credentials <CLUSTER_NAME> --region <REGION> --project <PROJECT_NAME> through the jenkins pipeline, I get the following error: ERROR:
(...
0
votes
1
answer
1k
views
How to regenerate kubeconfig on a freshly setup kubernetes cluster
I setup a kubernetes cluster using this tutorial 2 days ago - https://www.linuxtechi.com/install-kubernetes-on-ubuntu-22-04.
The setup went fine, and I could run kubectl commands, create deployments, ...
0
votes
1
answer
623
views
kubectl use config for authentication
I'm creating a pipeline to deploy some application in kubernetes.
I've been given the authentication credentials as a yaml file similar to the following:
apiVersion: v1
clusters:
- cluster:
...
0
votes
2
answers
6k
views
Error from server (Forbidden): pods is forbidden: User cannot list resource "pods" in API group at the cluster scope
My private AKS Cluster is accessible only to the root user using kubectl on a jumphost. But for a non-root user it throws below error message:
someuser@jump-vm$ kubectl get pods -A
Error from server (...
1
vote
0
answers
156
views
kubectl get node is returning connection refused [duplicate]
When I add this command:
sudo kubectl get node --kubeconfig /etc/kubernetes/admin.conf
I got
NAME STATUS ROLES AGE VERSION
master NotReady control-plane 42m v1.26.1
but ...
1
vote
0
answers
314
views
Access to eks cluster with Lens issue
I'm facing a problem whith Lens access to eks around 2 months ago.
I think I tried a lot of solutions but nothing is working for me.
I'm accessing to eks fine on wsl Ubuntu with AWS credentials.
I ...
0
votes
1
answer
380
views
How to access EKS cluster with kubeconfig even when disabling endpoint public access
So, I am trying to setup an EKS cluster using Terraform EKS Module.
Everything is good, until I try to set the cluster_endpoint_public_access to false. I can no more access the cluster with my ...
1
vote
1
answer
1k
views
How to switch kubernetes contexts dynamically with client-go?
I'm building a CLI application that would allow me to run an arbitrary command in my shell against any kube cluster in my kubeconfig that matches a given regex. I want to use the official client-go ...
0
votes
0
answers
149
views
Unable to change kube context
I run this AWS command to update my kubeconfig to point to a remote server. Everything works as expected and it's cool.
aws --profile XXXXX eks update-kubeconfig --name ${1}
Updated context arn:aws:...
1
vote
0
answers
255
views
How can I extend the kubeconfig in EKS?
The Problem
AWS EKS runs a bootstrap script that reads arguments and environment information to write a kubeconfig file before starting kubelet. I want to change a bit of the garbage collection by ...
0
votes
1
answer
974
views
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 ...
1
vote
3
answers
686
views
kubectl command for talking to multiple physical clusters
This is my ~/.kube/config file:
apiVersion: v1
clusters:
- cluster:
server: https://192.168.10.190:6443
name: cluster-1
- cluster:
server: https://192.168.99.101:8443
name: cluster-2
...
0
votes
1
answer
524
views
Get hard-coded credentials in GKE kubeconfig
I am currently getting my kubeconfig files for my GKE clusters via
export KUBECONFIG=<config-path>
gcloud container clusters get-credentials cluster-name --region=region-name
Now I get the ...
1
vote
0
answers
140
views
Merge kubectl config into ~/.kube/config
To use kubectl(to talk to kubernetes api-server) with merged config,
below two commands can be used to merge kubeConfig:
KUBECONFIG=~/.kube/config:/path/to/another/config.yml kubectl config view --...
0
votes
1
answer
2k
views
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
...
1
vote
1
answer
1k
views
'config_path' refers to an invalid path: "kubeconfig": stat kubeconfig: no such file or directory
We are running a terraform to create a GKE Cluster and using the below to create a local kubeconfig file after the creation of the cluster.
module "gke_auth" {
source = "terraform-...
1
vote
1
answer
351
views
Authenticate to GKE cluster without setting GOOGLE_APPLICATION_CREDENTIALS environment variable
What is the best way to authenticate to a GKE cluster without actually setting env variables for GOOGLE_APPLICATION_CREDENTIALS or KUBECONFIG. I have an application running on a container which has to ...
0
votes
1
answer
87
views
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
...
1
vote
1
answer
2k
views
How to change the name of a user in kube config file with kubectl?
How do you change the name of a user in a kube config file with kubectl (no text editor)?
Example kube config file stage_config.yaml:
apiVersion: v1
clusters:
- cluster:
certificate-authority-data:...
0
votes
1
answer
2k
views
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....
0
votes
1
answer
821
views
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 ...
0
votes
1
answer
3k
views
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 ...
0
votes
0
answers
71
views
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 :...
0
votes
1
answer
125
views
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, ...
1
vote
0
answers
548
views
In Kubernetes new users have all permissions to do anything although they are not assigned any Roles or ClusterRoles
RBAC is enabled (checked with kubectl api-versions, and got rbac records in the output). So as I assume, the normal users that are not bound with any Roles and ClusterRoles should have the most ...
0
votes
1
answer
348
views
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 ...
1
vote
1
answer
4k
views
How to use kubeconfig as environment variable in GitLab
I'm creating a GitLab CI/CD pipeline to deploy an application to Azure Kubernetes Services.
How can I specify a kubeconfig file as environment variable?
How can be used in the pipeline?
0
votes
1
answer
4k
views
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 ...
2
votes
1
answer
4k
views
How to add minikube in my kubeconfig file?
My kubeconfig file only includes docker-desktop, how to add cluster and user definitions of minikube to kubeconfig file to interact with kubectl command so with Monokle itself?
0
votes
1
answer
1k
views
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 ...
1
vote
3
answers
9k
views
Error `executable aws not found` with kubectl config defined by `aws eks update-kubeconfig`
I defined my KUBECONFIG for the AWS EKS cluster:
aws eks update-kubeconfig --region eu-west-1 --name yb-demo
but got the following error when using kubectl:
...
Use "kubectl <command> --...
1
vote
0
answers
769
views
Microk8s : Generating Auth Certificates
I'm trying to generate another kubeconfig for a microk8s cluster. For this I chose the certificates approach and I'm using the following script to generate the certificates, create the certificate ...
0
votes
1
answer
295
views
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 ...
0
votes
2
answers
3k
views
File not found error when copying kubeconfig file to jenkins context
I am trying to access a k0s cluster with Jenkins in order to deploy from Jenkins pipeline. In order to copy/paste cluster credentials in the kubeconfig file I tried to access with "~/.kube/config&...
1
vote
0
answers
201
views
K3S HA installation issue - adding floating ip to cluster
I am trying to create a HA k3s cluster using HAProxy and Keepalived.
For new installations ( where --tls-san param is added on first time install ) everything works great.
I am encountering an issue ...
0
votes
1
answer
444
views
We are in the process of configuring Kubectl to manage our cluster in Azure Kubernetes Service
1.Can we get azure kubectl(exe/bin) as downloadable link instead of installing it using command line 'az aks install-cli' or can I use the kubectl from kuberenetes?
2.Is there any azure-cli command to ...
1
vote
1
answer
5k
views
Load kubect config file using Kubernetes Python client returns error: Invalid kube-config file
I wrote a service to retrieve some information from the Kubernetes cluster. Below is a snippet from the kubernetes_service.py file that works perfectly when I run it on my local machine.
from ...
0
votes
0
answers
2k
views
Helm add repo fail with connection time out
I installed k3s using the following command. I'm using Vagrant box with opensuse.
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.19.5+k3s1 K3S_KUBECONFIG_MODE="644" sh -
It ...
1
vote
0
answers
419
views
rancher/k8s cluster not accessible when rancher server down
I set up a two clusters with rancher 2.5.x, one single-node management cluster for running the rancher server and one "production" server which handles the application stacks.
This worked ...