3,678 questions
1 vote
1 answer
90 views
Why does kubectl create secret fail with an error stating it is not logged in?
When I try to run kubectl create secret generic from my pipeline it fails with the error: error: You must be logged in to the server (the server has asked for the client to provide credentials) Here ...
-6 votes
2 answers
332 views
How to filter recent logs with kubectl logs for a specific pattern?
I’m working with Kubernetes and I often need to check my application logs for specific keywords, but only within the most recent log entries. For example, I can get the logs from my pod using: kubectl ...
0 votes
0 answers
133 views
Why does kubectl logs --follow show duplicate output when used in a loop to watch Kubernetes Job logs?
I'm running a Kubernetes Job from a Jenkins pipeline and want to stream its logs until completion. I currently use this pattern in a Bash script: job_status_cmd_complete="kubectl get job ${...
0 votes
1 answer
556 views
How do you list all pods of a specific type using kubectl?
In the past I would use something like this kubectl get svc --field-selector spec.type=LoadBalancer kubectl get svc --field-selector spec.type=ClusterIP However this stopped working when I updated ...
0 votes
1 answer
570 views
Kubelogin doesn't store access token locally [closed]
I have to use kubelogin to connect to a remote Kubernetes cluster. Mac OS with version 15.4.1. Installed kubelogin with Homebrew (only this is available way for Mac): brew install Azure/kubelogin/...
-1 votes
1 answer
718 views
Error: failed to get token: initialing the device code authentication
I have installed the kubectl binary with curl and kubelogin with snap. I am unable to connect to Azure Kubernetes Service (AKS) cluster recently with kubectl. I have seen that the connection steps ...
0 votes
1 answer
65 views
How to retrieve only the master node name using kubectl?
I am trying to get the name of the master (control-plane) node in my Kubernetes cluster using kubectl. I want the command to return only the name of the node without any additional information. I have ...
0 votes
1 answer
882 views
Does AWS EKS 1.32 have issues creating services and targetgroupbinding?
I could create service and targetgroupbinding entities as described below with AWS EKS 1.31, few days back we upgraded to AWS EKS 1.32 and started getting issues while creating same services and ...
0 votes
1 answer
123 views
How to restore default docker destop's KUBECONFIG for demo-k8s
In my local windows dev environment, I've run az aks get-credentials --resource-group $RG --name $AKS --overwrite-existing kubectl now connects to AKS cluster. How do I revert the KUBECONFIG to ...
0 votes
1 answer
199 views
How to set multiple kubeconfigs using powershell
The kubectl documentation says, we should use : to separate paths to multiple kubeconfig files, but it does not work in powershell: > $env:KUBECONFIG="C:\Users\me\.kube\staging-config:C:\Users\...
0 votes
1 answer
175 views
Unable to connect to service in same namespace in kubernetes
I have 2 apps. One is config-server and other is business-logic-app that consumes data from config-server. Both are running on same namespace in Kubernetes (kubectl on my laptop). However, am getting ...
0 votes
0 answers
122 views
kubectl patch deployment to new configmap not working
I have two kube configmaps, one of them is being used in a deployment. The config maps, and the pod deployment are below File : configmap.yml apiVersion: v1 kind: ConfigMap metadata: name: mock-url-...
0 votes
1 answer
52 views
Does all the kubectl commands executed using put params in concourse explicitly do readiness check?
I m trying to deploy a docker container into Kubernetes using concourse ci put params, I could see after executing the kubectl command it explicitly checks for the readiness of all the others pods ...
0 votes
1 answer
155 views
Dependent Vars not resolving on kubectl
This is just a contrived example from https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/ I'm just trying to create this behavior using kubectl command (not ...
0 votes
2 answers
237 views
Deleting an OpenShift deployment with a Recreate Update strategy
In a Dev OpenShift sandbox I have the following kubernetes resources: NAME READY STATUS RESTARTS AGE pod/workspace036c85e5c44e4207-697d66f7c4-jbwcp ...