Questions tagged [kubectl]

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.

3648 questions
1
vote
0 answers

Drain K8s Node using Javascript Kubernetes Client

I'm using the Javascript @kubernetes/client-node library and I want to gracefully remove a node from K8s (following this). I've not found any guides or documents showing how this can be done correctly using a K8s client library. The only resource I…
Carlo Corradini
  • 2,927
  • 2
  • 18
  • 24
1
vote
1 answer

Error: connect ECONNREFUSED 127.0.0.1:443 http://ingress-nginx-controller.ingress-nginx.svc.cluster.local

kubectl get namespace default Active 3h33m ingress-nginx Active 3h11m kube-node-lease Active 3h33m kube-public Active 3h33m kube-system Active 3h33m kubectl get services -n ingress-nginx NAME …
1
vote
2 answers

Running `kubectl exec` script from file is not working

I'm trying to create a script in order to run multiple kubectl exec commands against multiple pods with multiple containers. The script seems to generate the command just fine but errors out when attempting to run it. example command that is…
cybersnow1989
  • 229
  • 3
  • 17
1
vote
0 answers

Readiness probe based on service

I have 2 pods and my application is based on a cluster i.e. application synchronizes with another pod to bring it up. Let us say in my example I am using appod1 and appod2 and the synchronization port is 8080. I want the service for DNS to be…
drifter
  • 389
  • 1
  • 5
  • 17
1
vote
1 answer

kubectl get --raw /metrics return Error from server (NotFound)

I am trying to use Prometheus for monitoring my EKS Fargate (k8s ver.: 1.23). So far I followed the procedure from https://aws.amazon.com/blogs/containers/monitoring-amazon-eks-on-aws-fargate-using-prometheus-and-grafana/ and…
Andrew
  • 129
  • 2
  • 8
1
vote
2 answers

is there a way to run a command in a pod when you exec into it using robot framework?

I am able to exec into a pod , and in that pod i will also like to run a stolonctl command at the same time into the pod i just exec into. Here is an example of what i will like to achieve. I tried using the first command first and then tried to see…
1
vote
2 answers

"sudo kubectl get status" connection refused

OS: Ubuntu 20.04 LTS, x86 64 After I rebooted my system with a kubernetes cluster, all the deployments, pods and everything else stoped wokring. How do I diagnose what the problem here is? The response to the command sudo kubectl get status is: The…
Ishan Hegde
  • 92
  • 11
1
vote
1 answer

Retrieve status of triggered pipeline using an API in Tekton

When we perform Tekton trigger API using an eventlistener, I am getting following response while in the background, pipeline runs for certain period of time. Is there any API to fetch the status of this pipelineRun using the given eventID or…
Mahesh
  • 1,117
  • 2
  • 23
  • 42
1
vote
1 answer

kubectl plugin tab auto complete not working with zsh

After installing kubernetes-cli via homebrew in a mac with zsh, the kubernetes auto complete is not working completely or in full. Only the first tab works and not the second tab onwards. Example, if I type kubectl [TAB], it displays the sub…
Venu
  • 1,513
  • 3
  • 19
  • 37
1
vote
0 answers

Inserting a Complex Nested JSON Column in MySQL

Here is my use case :- I am trying to get the deployment details in a JSON format using : kubectl get deployment -o json depl_name and inserting result back to a column: meta_data in MySQL. The column data type is json . But the insert statement is…
1
vote
2 answers

run a shell script inside the pod

I am trying to write a single line command to run a shell script which is inside the pod getting a shell for a running container: kubectl exec -it test-pod -c test-container -- /bin/bash directory in the container: cd test/bin script inside the…
Devaddy
  • 45
  • 6
1
vote
1 answer

I am getting an error while running kubectl version although I installed it by following the documention

kubectl version /home/lenovo/.local/bin/kubectl: line 1: syntax error near unexpected token <' /home/lenovo/.local/bin/kubectl: line 1: NoSuchKeyThe specified key does not exist.No such object: kubernetes-release/release//bin/linux/amd64/kubectl'
Noob
  • 11
  • 1
  • 4
1
vote
1 answer

Kubernetes Rollout Drop Old Pods When New Pods Are Not Fully Ready

I'm using the kubectl rollout command to update my deployment. But since my project is a NodeJS Project. The npm run start will take some take(a few seconds before the application is actually running.) But Kubernetes will drop the old pods…
Zichzheng
  • 1,090
  • 7
  • 25
1
vote
2 answers

Nodejs/Gcloud/kubectl any command we run from WSL2 is deadly slow

I referred many solutions yet no luck. I have a linux automation which runs few gcloud commands with some conditions. I made this script with node js, but it is incredibly slow that I even finish it manually before the scrips completes the run. Same…
1
vote
1 answer

All pod staying in pending mode with Events None in a K3S ARM64 + AMD64 cluster

I found many issues about this on StackOverflow; most are non-responded and over-complicated. I shrink my issue to a simple "Hello world" test in a brand-new empty cluster. I have a K3s cluster, the master is an online bare-metal AMD64 server, and…
Uriel
  • 121
  • 1
  • 1
  • 8