The Kubernetes command-line tool, kubectl, allows you to run commands against Kubernetes clusters. You can use kubectl to deploy applications, inspect and manage cluster resources, and view logs.
Questions tagged [kubectl]
3648 questions
1
vote
1 answer
Connection Refused when trying to load keycloak on the browser after deployed it on Kubernetes successfully
I just follow the Keycloak Documentation for Kubernetes.
https://www.keycloak.org/getting-started/getting-started-kube
But After deployed it like exactly how they are saying in the documentation.
When I try to load the keyclaok page, I'm getting…

Gayan Kodithuwakku
- 68
- 1
- 8
1
vote
1 answer
error with kubectl --since-time flag not recognizing datetime format
I am taking a user input, "2023-09-02" (YYYY-DD-MM) and converting it to the specified datetime format(RFC3339) as specified in the official docs:
--since-time="": Only return logs after a specific date (RFC3339)
Here is the section responsible…

Ctfrancia
- 1,248
- 1
- 15
- 39
1
vote
1 answer
How to get the full name of a pod by both its creation date and part of its name?
In my namespace, I have several pods named with the same prefix, followed by the random string. There are also other pods, named differently. The result of kubectl get pods would look something like…

CloudWatcher
- 181
- 1
- 11
1
vote
1 answer
Is delete in Kubernetes idempotent
Is calling Delete in the Kubernetes go API an idempotent operation, i.e. can it safely be called twice?
If so, is there any documentation defining this property?
The go code just states
Delete deletes the given obj from Kubernetes…

Timm Felden
- 23
- 5
1
vote
1 answer
Issue on GCP Kubernetes cluster connectivity from local (Windows 10)
I have two projects in GCP i.e. Project A and Project B. Project A has Cluster CA and Project B has Cluster CB. Now I have configured my local environment [ Windows 10 ] with Gcloud CLI and Kubetel to connect to environment. Usigng "gcloud init"…

ajoy sinha
- 1,156
- 4
- 14
- 30
1
vote
1 answer
Build Kustomize with Helm Fails to Build
kustomize build --enable-helm .I have the following project structure:
project
- helm-k8s
- values.yml
- Chart.yml
- templates
- base
- project-namespace.yml
- grafana
- grafana-service.yml
-…

joesan
- 13,963
- 27
- 95
- 232
1
vote
1 answer
Why does minikube doesn't have access to k8s registry?
Running the minikube start command, I am getting this message:
This container is having trouble accessing https://registry.k8s.io
and after this the Booting up control plane process takes a long time then gives the following error:
Error starting…

Oliver Domokos
- 51
- 5
1
vote
2 answers
Where do I find the function for "kubectl describe "?
I am studying "kubectl describe" sourcecodes at https://github.com/kubernetes/kubectl/blob/master/pkg/describe/describe.go
However, I still could not figure out how "kubectl decsribe [CRD]" works (as in which function/functions are called).
I am a…

Daniel Yeap
- 17
- 1
- 4
1
vote
0 answers
kubectl get node is returning connection refused
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 when I send:
sudo kubectl get node
I got
E0126…

Ali Shehab
- 23
- 3
1
vote
2 answers
minikube ingress on macos appears to be working but never connects (times out no error)
MacOS Big Sur 11.6.8
minikube version: v1.28.0
Following several tutorials on ingress and attempting to get it working locally. Everything appears to work: manual minikube service foo works, kubectl get ingress shows an IP, pinging the designated…

Mike M
- 51
- 6
1
vote
0 answers
Kubectl command to wait for Pod termination which fails fast
I have a test that launches a Pod to check that certain functionality exists within the cluster.
I want to launch the Pod with kubectl create then kubectl wait to get the container's exit code to determine the test's successfulness, with a fail-fast…

Dan McGreal
- 11
- 2
1
vote
2 answers
Exposing pod to outside world with MySQL database in Azure Kubernetes Service
Hi I've deployed single MySQL db instance in Azure via the YAML file in Azure Kubernetes service. I can get into the container via CLI when I'm inside my cluster. I would like to connect with db instance via external client like MySQL Workbench or…

Krzysztof Michalski
- 791
- 1
- 9
- 25
1
vote
0 answers
How to execute a kubectl (k8s) command in all clusters?
I want to get all pods with a specific label in all contexts.
What I have to do now is to iterate the contexts found in kubectl config get-contexts:
kgp --context [CONTEXT] -n my-namespace -l app=my-app
Is there an equivalent of all-namespaces but…

Juancki
- 1,793
- 1
- 14
- 21
1
vote
1 answer
Kubectl against GKE Cluster through Terraform's local-exec?
I am trying to make an automatic migration of workloads between two node pools in a GKE cluster. I am running Terraform in GitLab pipeline. When new node pool is created the local-exec runs and I want to cordon and drain the old node so that the…

YYx00xZZ
- 28
- 6
1
vote
4 answers
How to startup old k8s cluster without losing pods and data?
I have a old k8s cluster with 1 master and 2 workers node. It was shutdown for a long time. Now I started it. It had many running pods and deployments.
After restart the VM's all k8s command return
The connection to the server 123.70.70.70:6443 was…

tauqeerahmad24
- 358
- 8