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
K8S How to add quotes when on parameters provided for `kubectl exec -c`
I am using K8S
I want to calculate a string that that is a result of kubectl exec -it ... -c
after the -c option there is a string.
How can I pass a string with double quotes inside.
The following example doesn't work properly.
x="$(kubectl exec…

Eitan
- 1,286
- 2
- 16
- 55
1
vote
1 answer
Krustlet bootstrap bash script on minikube
I was attempting to run a hello-world demo of Krustlet on minikube.
According to Krustlet's official tutorial, there is step to generate a bootstrap config with a utility script.
Since I was running minikube without kubectl manually installed, I had…

f1rewatch
- 31
- 3
1
vote
2 answers
How to forward a k8 pod's port via jumphost
I can ssh into a jumphost from where I can accesss k8 cluster.
there is a particular pod which has a UI exposed on port 4040, how can I view that on my local browser ?
What I have figured out so far, by executing the below command
kubectl…

Sharang Chopra
- 226
- 1
- 10
1
vote
1 answer
Running command line for kubectl image in yaml for k8s
I want to declare in yaml file command line that uses the kubectl image, for any command of `kubectl', i.e. waiting to another pod to be for ready state.
If I run in command:
kubectl wait pod/mypod --for=condition=ready --timeout=120s
I get a true…

Eitan
- 1,286
- 2
- 16
- 55
1
vote
2 answers
Cant connect to GKE cluster with kubectl. getting timeout
I executed followign command
gcloud container clusters get-credentials my-noice-cluter --region=asia-south2
and that command runs successfully. I can see the relevant config with kubectl config view
But when I try to kubectl, I get timeout
kubectl…

LightSith
- 795
- 12
- 27
1
vote
0 answers
Microk8s on Window11 not install/uninstalling correctly
I am having problems after uninstalling microk8s and reinstalling the software. The first time, it was able to find and establish a connection to Hyper-V which was configured and working nicely. I accidentally uninstalled the software thinking that…

Louis Preston Thornton III
- 302
- 1
- 2
- 12
1
vote
1 answer
Istio service to service communication
I am new to Istio and I am trying to communicate 2 spring boot applications with Istio: component with requirement.
I have installed Istio 1.13.2 on a GKE cluster with the demo profile:
istioctl install --set profile=demo -y
I have automatically…

Yuliani Moreno
- 13
- 4
1
vote
1 answer
Adding a field in DaemonSet returns "Unknown field "nodeAffinity" in io.k8s.api.apps.v1.DaemonSet"
Using KubeEdge and I'm attempting to prevent my edgenode from getting kube-proxy deployed.
When I attempt to add fields to daemonsets.apps with the following command:
sudo kubectl edit daemonsets.apps -n kube-system kube-proxy
With the following…

syntaxerror
- 31
- 8
1
vote
0 answers
How to access minikube service remotely?
I have installed minikube in remote rdp server(windows). I have deployed spring boot application and expose that deployment as a service using load balancer on specific port. I was able access the application inside the rdp. But when i tried to…

I.vignesh David
- 113
- 7
1
vote
1 answer
Unable to interact with the application via minikube
I'm learning kubernetes via a LinkedIn learning course. A tutorial I'm doing runs this hello world application via kubectl and minikube. Everything appears in working order, but I cannot interact with the application using minikube service…

DigitalEye
- 1,456
- 3
- 17
- 26
1
vote
1 answer
Airflow Helm Chart Worker Node Error - CrashLoopBackOff
I am using official Helm chart for airflow. Every Pod works properly except Worker node.
Even in that worker node, 2 of the containers (git-sync and worker-log-groomer) works fine.
The error happened in the 3rd container (worker) with…

Aditya Sinha
- 614
- 8
- 18
1
vote
2 answers
Kustomize patch with string literal: Double quotes replaced with single quotes
When adding a kustomize patch to a kustomization.yaml the double quotes are replaced with single quotes that lead to error
I am using the following:
kustomize edit add patch --patch "- op: add\n path:…

mbbce
- 2,245
- 1
- 19
- 31
1
vote
1 answer
How to change docker default storage size
I've been having loads of issues with kubectl not having enough space. How can I increase the default storage size allocated to docker?
None of minikube recommendations worked.
1. Run "docker system prune" to remove unused Docker data (optionally…

Caterina
- 775
- 9
- 26
1
vote
1 answer
'Access denied' error when using kubectl in Lens' terminal
I downloaded Lens and imported my config file there and everything works great on Lens
other than the fact that kubectl commands don't work through the terminal.
I was trying an exec command:
kubectl exec -i -t -n mynamespace mypod -c mycontainer --…

teamdever
- 309
- 6
- 21
1
vote
2 answers
docker prune equivalent command in Kubernetes
I have two below docker commands, can someone let me know the equivalent kubernetes (kubectl) command for single node cluster :
docker image prune -a --force --filter until=5m
docker container prune --force --filter until=5m
Also are these two…

solveit
- 869
- 2
- 12
- 32