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

Capturing ssl keys for kubectl

I want to decrypt kubectl requests to kubernetes api server (over tls) with wireshark (for exec -it subcommand). I found that there's SSLKEYLOGFILE variable that can be used by wireshark for decrypting tls packets but kubectl doesn't log tls session…
Babak
  • 19
  • 1
  • 2
1
vote
1 answer

Configuring RBAC for kubernetes

I used the following guide to set up my chaostoolkit cluster: https://chaostoolkit.org/deployment/k8s/operator/ I am attempting to kill a pod using kubernetes, however the following error: HTTP response body:…
1
vote
1 answer

Persistance storage sharing between the task in Tekton pipeline

I have a below pipeline apiVersion: tekton.dev/v1beta1 kind: Pipeline metadata: name: git-clone-pipeline spec: params: - name: repo-url type: string workspaces: - name: shared-workspace tasks: - name: clone-repository …
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
1
vote
1 answer

Where is the log file for `kubectl log pod/yourpod`

When I type kubectl log pod/yourpod to get my pod's logs, behind the scene, k8s must read the log from somewhere in my pod. What's the default path to the log generated by my container? How to change the path? Inside my container, my process uses…
Mike
  • 1,841
  • 2
  • 18
  • 34
1
vote
0 answers

error: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1" in kubectl

I have a kube config to a kubernetes cluster that used to work. I guess after I upgraded the docker desktop, even simple kubectl version will give me this error: error: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1"
xsqian
  • 199
  • 5
  • 13
1
vote
1 answer

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 communicate with multiple GKE clusters at once.…
1
vote
2 answers

Kubectl get deployment yaml file

I know how to list of pods for certain namespace as follows: kubectl get pods -n mynamespace There is one POD on the list which i am interested. I would like to be able to see what yaml deployment file was used for creation of that pod and the…
Henry
  • 537
  • 1
  • 9
  • 22
1
vote
1 answer

What does - means in kubectl -f -

What does the last - (following -f) mean in the following command: kustomize build config/samples | kubectl apply -f -
Mike
  • 1,841
  • 2
  • 18
  • 34
1
vote
2 answers

minikube service url not wokring

Error starting tunneling of service. OS: mac os minikube version: v1.25.2 kubectl version: 1.24.1. and using docker desktop The following script is the configuration of the /zipkin directory. # service.yaml apiVersion: v1 kind: Service metadata: …
user19011807
1
vote
1 answer

How to parameterize multiple kubernetes manifests in terraform

I have the following in main.tf data "kubectl_path_documents" "yaml-files" { pattern = "${path.module}/manifests/*.yaml" } resource "kubectl_manifest" "yaml-manifests" { for_each = toset(data.kubectl_path_documents.yaml-files.documents) …
fledgling
  • 991
  • 4
  • 25
  • 48
1
vote
2 answers

Duplicate an Existing K8s Pod

In a namespace foo there is an existing pod running $ kubectl get pods -n foo NAME READY STATUS RESTARTS AGE hello-1816639685-xejyk 1/1 Running 0 6d3h How can we duplicate the hello pod so that we…
gameveloster
  • 901
  • 1
  • 6
  • 18
1
vote
1 answer

How to find deployment failure cause? error: deployment "sample-app" exceeded its progress deadline

I tried simple example from Gitops book apiVersion: apps/v1 kind: Deployment metadata: name: sample-app spec: replicas: 1 revisionHistoryLimit: 3 selector: matchLabels: app: sample-app template: metadata: labels: …
Richard Rublev
  • 7,718
  • 16
  • 77
  • 121
1
vote
1 answer

How to list containers and its info running a pod using kubectl command

When we run kubectl get pod => it is listing the count of containers running inside a pod and restart count. So I am not sure which container gets restarted. Either I need to login to UI or using kubectl describe pods. NAME READY STATUS …
anonymous user
  • 257
  • 5
  • 23
1
vote
0 answers

connect internal service to frontend ingress

I am trying to connect react application that is available through ingress to my kubectl backend service. How should I go about it without exposing the backend with ingress? Here is the ingress yaml: apiVersion: networking.k8s.io/v1 kind:…
Seiteros
  • 191
  • 1
  • 2
  • 6
1
vote
1 answer

Access to a kubernetes cluster from inside a docker container

I have some docker containers running with docker compose (node.js, databases, nginx...). I have also a minikube Kubernetes cluster. I am trying to communicate from node.js container to Kubernetes to manage some nodes (using Kubernetes API and the…
Alvaro98
  • 64
  • 5