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
1 answer

Using Ansible json_query to Check Output of Json Kubectl command

I am trying to use Ansible to put a pause in my playbook, since I am installing an operator from the Operator Hub and don't want to continue, until I know the CRDs I require in the following steps are installed. I have the following task but can't…
CodyK
  • 3,426
  • 4
  • 36
  • 52
1
vote
1 answer

Tekton Pipelines: Enable alpha features using released pipelines yaml without the need to store (& maintain) feature-flags ConfigMap

We'd like to use Tekton experimental features such as the Pipelines In Pipelines feature. We already installed the feature as described in the README via kubectl apply but end up in an error like this: Pipeline default/buildpacks-test-pipeline can't…
jonashackt
  • 12,022
  • 5
  • 67
  • 124
1
vote
1 answer

The command `gcloud container clusters get-credentials ` will not create a kubeconfig

When I type gcloud container clusters get-credentials, I get response entry generated for ***.. and it looks like it is generated, but when I hit kubectl config view, there is nothing. Reference of gcloud container clusters get-credentials…
iwatachan
  • 159
  • 2
  • 8
1
vote
1 answer

AWS SSO authorization for EKS fails to call sts:AssumeRole

I'm migrating to AWS SSO for cli access, which has worked for everything except for kubectl so far. While troubleshooting it I followed a few guides, which means I ended up with some cargo-cult behaviour, and I'm obviously missing something in my…
austin327
  • 21
  • 5
1
vote
2 answers

aws-load-balancer-scheme: internal does not create an NLB, no error

aws-load-balancer-scheme: internal does not create an NLB, no error, it just never creates the NLB If I use the deprecated service.beta.kubernetes.io/aws-load-balancer-internal: "true", it works fine. However, the annotation documentation says to…
1
vote
1 answer

Use `kubectl` from "asdf" instead of "homebrew"

I have had kubectl installed from homebrew in mac since a long time. So from my path, the homebrew kubectl is used. Today I installed kubectl using asdf to be able to use different versions of kubectl for different projects. However, my mac still…
Rakib
  • 12,376
  • 16
  • 77
  • 113
1
vote
1 answer

JupyterHub Not Loading Up with Given External-IP| K8s | Helm

I have a bare metal setup with MetalLB and nfs-subdir via helm (source). I am using k8s v1.20.5 with one master and two worker nodes. I installed JupyterHub with Helm, setting the secretkey and readjusted the allocated volume. On run, the pods look…
SavvY
  • 131
  • 1
  • 6
1
vote
1 answer

How do I read a file from deployment's pods using fabric8 kubernetes java client?

How can I read a file from a deployment's pods? More specifically, I want fabric8's kubernetes java client equivalent of the following command: kubectl exec --stdin --tty deployment/otel-collector -n logcollection -- cat…
lprakashv
  • 1,121
  • 10
  • 19
1
vote
1 answer

kubectl wait for Service on AWS EKS to expose Elastic Load Balancer (ELB) address reported in .status.loadBalancer.ingress field

As the kubernetes.io docs state about a Service of type LoadBalancer: On cloud providers which support external load balancers, setting the type field to LoadBalancer provisions a load balancer for your Service. The actual creation of the load…
jonashackt
  • 12,022
  • 5
  • 67
  • 124
1
vote
2 answers

Handling Data & Sorting Results in PowerShell

I am having trouble manipulating the data returned from a PowerShell query. My goal is to get all NAMEs that are great than 30 days old (>30d). After that, I want to load the NAMEs of these results into an array. The data returned from my query is…
Kerbol
  • 588
  • 2
  • 9
  • 24
1
vote
1 answer

How to update kubectl to latest version and sync kubectl client and server version on MacOs (local minikube)?

I've updated kubectl client version to the latest but I am not able to update kubectl server version to the latest due to which client and server versions are different. The problem is: how can I update kubectl server version? P.S i'm running…
MuhammadSannan
  • 109
  • 3
  • 15
1
vote
2 answers

How to see the history in Pod Kubernetes

I use this kubectl to deploy a pod with the image nginx: kubectl create deployment --image= image-app Now I want to update this pod with image= and run this command: kubectl create deployment --image=
user1938143
  • 1,022
  • 2
  • 22
  • 46
1
vote
2 answers

Not able to load Kubernetes logs

I'm running an AKS (Azure Kubernetes Service) cluster, but now when try to reach the logs I'm getting the issue below, which is weird because I wasn't facing it. Issue: kubectl logs -n default hello-display-759947d684-782n5 2021/11/02 08:11:04…
1
vote
1 answer

How to delete secrets older than 24 hours using kubectl?

I have the following command: kubectl delete -n vnamespace secret --field-selector type=my_secret this works fine but delete all secrets. I want to delete secrets older than 24 hours. How can I add it?
Slava
  • 325
  • 5
  • 13
1
vote
2 answers

Getting all pods for a container, storing them in text files and then using those files as args in single command

The picture above shows the list of all kubernetes pods I need to save to a text file (or multiple text files). I need a command which: stores multiple pod logs into text files (or on single text file) - so far I have this command which stores one…
marcz2007
  • 167
  • 1
  • 1
  • 11
1 2 3
99
100