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
rpc error: code = unknown desc = failed to pull and unpack image x509: certificate signed by unknown authority
I am facing the same issue as mentioned in ErrImagePull: x509: certificate signed by unknown authority.
I copied the ca.crt to /etc/docker/certs.d/my.harbor.com/ along with my.harbor.cert and my.harbor.com.key, and I also copied the ca.crt to…

Atul Mishra
- 11
- 3
1
vote
1 answer
Powershell parsing problem with kubectl --field-selector
Why does this Powershell command sequence using 2 field selectors and Powershell variable $Node not return any pods?
$Node = "mynode000001"
$pods = (kubectl get pods --field-selector status.phase!=Succeeded,spec.nodeName=$Node -A -o json |…

mpowrie
- 603
- 8
- 14
1
vote
1 answer
Can I expose multiple Kubernetes services on the same external IP?
I have several image do different thing. Now, I expose them like these commands:
kubectl create deployment work_deployment_1 --image=username/work_image_1:0.0.1-SNAPSHOT
kubectl expose deployment work_deployment_1 --type=LoadBalancer…

hlx
- 31
- 4
1
vote
0 answers
What are benefits of using `patch` over `replace` or `apply` if we have whole spec of the resource?
I've read a couple of online resources and pages to try to understand the actual differences between patch, apply and replace. My current understanding is:
apply will declaratively perform the needed updates to the specified resource, if that's not…

Dominik Wosiński
- 3,769
- 1
- 8
- 22
1
vote
1 answer
How to disable PodSecurityPolicy warning?
I am trying to understand where is this warning coming from ? I have disabled the PSP support in my cluster and indeed using k8s version lower than 1.25. But I want to understand and disable this warning. Is it possible ? Which controller is…

Newbie
- 356
- 2
- 9
1
vote
0 answers
Is there a way to use goclient to execute kubectl commands
I want to get kubectl get nodes O/P using go code. I know there is GocLient to get the result but what I am looking for is pretty printed result just like how we get in CLI. Is there any wrapper code available for this requirement.

ambikanair
- 4,004
- 11
- 43
- 83
1
vote
1 answer
How to access Kubernetes application hosted on-prem centos server?
I'm fairly new to K8. Using k3d/helm, I installed an application on our on-prem ssh server. I did port forward on 8080. I'm able to do "curl localhost:8080" when I'm inside the server. Could you plz guide me how can I access this application from my…

J Jena
- 51
- 3
1
vote
0 answers
Getting authorization error after upgrading EKS to version 1.25 (user=kube-apiserver-kubelet-client, verb=get, resource=nodes, subresource=proxy)
All my permissions were working fine before. After upgrading to EKS 1.25, I started getting the error below when doing kubectl logs pod -n namespace
I tried to debug it. I look at the configMap, clusterRole and RoleBinding. I don't see any apparent…

cloudviz
- 971
- 4
- 15
- 40
1
vote
0 answers
How to call kubernetes API server using curl and certificate authority
I have created EKS cluster using the IAM user. So now the system:creator is my own IAM user.
I have configured the aws CLI and kubectl command line tools to use the credentials properly and both the comand line tools , aws and kubectl are working…

user2315104
- 2,378
- 7
- 35
- 54
1
vote
1 answer
kubectl with Docker Desktop - how to connect
I was using kubectl with Docker Desktop - everything was fine
I think logged into Openshift via the Command line and kubectl seemed to point to OC cluster
I then logged out of Openshift and now kubectl doesn't seem to point at anything? How do I get…

GmanG77
- 51
- 3
1
vote
0 answers
kubelogin convert-kubeconfig need to be invoked after every az aks get-credentials
I'm having the problem described here: https://aptakube.com/blog/how-to-use-azure-kubelogin
If I follow the article and use kubelogin convert-kubeconfig -l azurecli it works again indeed.
The problem is that every time I refresh my credentials using…

Joly
- 3,218
- 14
- 44
- 70
1
vote
1 answer
Error: Error response from daemon: No command specified - while trying to Deploy my Spring Boot Application to a local Kubernetes Cluster
I'm trying to deploy my spring boot application to local kubernates cluster.
I have performed the below steps
1.created the application build the image and pushed to docker hub registry
2.created the secret and configured
3.created the deployment…

Vishnu s nair
- 21
- 3
1
vote
3 answers
How can I get a list of pods using a regular expression?
I tried the following but failed to get a list of all pods like these:
my-pod-1
my-pod-19
my-pod-24
etc.
kgp | grep -E my-pod-[0-9]+
kgp | grep -E my-pod-[0-9]
kgp | grep -i -E my-pod-[0-9]
kgp | grep -i -E "my-pod-[0-9]"
kgp | grep -i -E…

dushkin
- 1,939
- 3
- 37
- 82
1
vote
1 answer
Cancel deletion of a Kubernetes Resource from Finalizer
In Kubernetes, there is deletionTimestamp to signal an ongoing deletion and there are finalizers to model tasks during the process of deletion.
However, it could be, that during the deletion, the specification of a parent object changes in a way…

Timm Felden
- 23
- 5
1
vote
0 answers
Deploying keycloak using digitalocean kubernetes
I have deployed my keycloak application to kubernetes. And using external ip from kubernetes service i am able to access the application. But when i click administration console. It shows Https required. How to access the master realm?

I.vignesh David
- 113
- 7