Questions tagged [kubectl]

73 questions
1
vote
1 answer

Ansible shell module fails to find kubectl

Running the command from the CLI on the server works perfect, but from playbook using Ansible shell module fails with: fatal: [localhost]: FAILED! => {"changed": true, "msg": "non-zero return code", "rc": 127, "stderr": "/bin/sh: kubectl: command…
BrillCom
  • 139
  • 2
  • 9
1
vote
1 answer

kubernetes kubectl Undo --insecure-skip-tls-verify to enable TLS Verification once again after it has been disabled

For testing purposes I have disabled tls verification for my cluster by typing: $ kubectl get nodes --insecure-skip-tls-verify This was done to temporarily fix a problem with an invalid certificate. Now that my certificate is valid again, I don't…
Jakub
  • 21
  • 3
1
vote
1 answer

How can I change the local port kubectl uses to establish a connection?

I want kubectl to use a different local port- not 22. Is this configurable? Is this something I have to configure in ssh? I want to create an ssh tunnel with IAP first and have kubeclt use that to connect to a private cluster. I create the tunnel…
red888
  • 4,183
  • 18
  • 64
  • 111
1
vote
1 answer

How to create a container-disk image for VMs provisioned using KubeVirt

I am trying to create a VM setup in my Kubernetes cluster using KubeVirt. I have two EC2 instances(Master node: t2.xlarge and worker node: m5.metal) in AWS cloud and I have setup the cluster using KubeAdm. The CNI used is Flannel. I had setup…
arjunbnair
  • 143
  • 1
  • 2
  • 11
1
vote
0 answers

Kubectl generates TLS handshake timeout with private EKS cluster

I'm seeing the following error when running any kubectl command and no data is returned. This error occurs when accessing a private AWS EKS instance over a VPN connection. $ kubectl get pods -A -v=9 ... 5800 helpers.go:116] Unable to connect to…
Vakent
  • 11
  • 1
  • 2
1
vote
0 answers

EKS: kubectl exec does not respect streamingConnectionIdleTimeout

Using EKS with Kubernetes 1.21, managed nodegroups in a private subnet. I'm trying to set the cluster up so that kubectl exec times out after inactivity regardless of the workload being execed into, and without any client configuration. I'm aware of…
Dmitry S.
  • 11
  • 1
1
vote
0 answers

which K3S ports should (not) be exposed on a public interface

The K3S documentation explains which ports are required for this kubernetes distribution to work. What it does NOT explain is, which of these ports are OK to be open on a public interface. K3S seem to deal with the following ports Master 6443/tcp…
tcurdt
  • 413
  • 1
  • 4
  • 10
1
vote
1 answer

`kubectl` connection to the server was refused

I've been following Kelsey Hightower's Kubernetes the Hard Way which walks you through manually setting up a k8s cluster. This is not running on minikube - it's running on a remote VPS. I'm on the step where I set up the k8s control plane. However…
abhchand
  • 119
  • 1
  • 2
1
vote
1 answer

Pods on two different nodes communicate very slow, any idea why?

I am learning k8s and I have 3 nodes k8s cluster. I have just recently deployed k8s with kubeadmin and so far it is working great. everything working perfectly but the only problem that I am facing is network throughput. my three nodes and replica…
Yousuf
  • 35
  • 2
  • 6
1
vote
1 answer

Kubernetes certificate with Letsencrypt

I want to create a certificate with letsencrypt. When I run the this yml apiVersion: cert-manager.io/v1 kind: Certificate metadata: name: grafana-tls namespace: grafana type: "kubernetes.io/tls" spec: secretName: grafana-tls issuerRef: …
Stefan
  • 117
  • 5
1
vote
0 answers

Cannot login to Kubernetes dashboard with userid - 404 error

I'm trying to setup a kubernetes dashboard in a test environment on AWS. I am able use the token from one of the default service accounts to login to the dashboard only to get all kinds of errors. This is after I gave the account cluster admin…
Will R
  • 11
  • 1
1
vote
2 answers

I have deleted all the Azure AKS Kubernetes Nodes, how to restore back the Cluster to it's original state?

I am new to the Azure AKS Cluster world, and while messing with a test cluster i have deleted all its Nodes with kubectl delete node xxxx, thinking that the cluster will heal itself. Boy, was i wrong. Now, let me explain the issue, so, when i run…
bumbo-jumbo
  • 31
  • 1
  • 4
1
vote
0 answers

Troubleshoot kubectl DNS Lookup REFUSED

This is happening on one engineers Macbook. Everyone else is able to run kubectl commands successfully. % kubectl --v=1000 get svc I0326 16:22:48.587540 28045 loader.go:379] Config loaded from file: /Users//.kube/config I0326…
D.Fitz
  • 162
  • 1
  • 8
0
votes
1 answer

Facing error again in minikube renew certificate

When I run kubectl command getting error is certificate expired How to debug minikube errors? kubectl get pods Unable to connect to the server: x509: certificate has expired or is not yet valid
Paul
  • 15
  • 4
0
votes
1 answer

How to find specific Kubernetes resource and "terminate/finalize" it when namespace deletion is stuck?

Hi I tried to delete some namespaces and they are stuck in terminating... From the below details, I tried to delete the supposed rolebindings and roles, but they won't delete either and I don't know where to find the resources for:…
user432024
  • 283
  • 1
  • 5
  • 15