As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [kubectl]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
120 views

Cannot install kubectl on Ubuntu - GPG Error

Hi I'm trying to install kubectl following the native package install instructions on the official site, but I get the following error when I try to update apt package list before installing kubectl: $...
sctx's user avatar
  • 3
0 votes
0 answers
48 views

Kubernetes connection refuses often

I have configured Kubernetes using kubeadm in cent os stream 9. When I issue kubectl commands i am getting this error often The connection to the server xx.xxx.xx.xx:6443 was refused - did you ...
sreelakshmi's user avatar
0 votes
1 answer
158 views

Forwarding apache logs from k8s Pod to Syslog server

I am new to Kubernetes, I know there are multiple ways to log collection. but I am specifically asking about my scenario. we have a Syslog xyz.com port 8090. now we want our pods to send logs to our ...
user3852599's user avatar
0 votes
0 answers
316 views

Kubelete fails with code=exited, status=1/FAILURE

I have setup K8S on fedora 37, following a Kubeadmi init seems images are pulled and things seemed correct. However, when I try Kubectl cluster-info 0406 11:58:52.440579 704658 memcache.go:265] ...
eliassal's user avatar
  • 101
0 votes
0 answers
93 views

Multi cloud provider kubernetes cluster pod logs got timeout

Hi all i have master node in digital ocean and worker node in google cloud, nodes are connected using public ip of master node and pods are in running status but when i run kubectl logs i'm getting ...
Thom's user avatar
  • 101
0 votes
0 answers
181 views

k3s kubectl logs times out after 50 seconds

TLDR: Depending on my k3s version, kubectl logs -f drops back to the console (timeouts?) exactly after 50 seconds without new log entries, instead of remaining attached until a Ctrl-C is issued. I can'...
Jorge Yanes Diez's user avatar
0 votes
1 answer
296 views

EKS cluster access - aws-auth : add groups in mapRoles

i try to access an EKS cluster on AWS with AWS Account (same i use for the console) steps i followed : aws configure with info provided in the "Command line or programmatic access" (AWS ...
awot83's user avatar
  • 71
0 votes
0 answers
500 views

Error While installing Calico CNI

I have a Kubernetes cluster with 1+1 configuration . I used the following steps to install Calico curl https://docs.projectcalico.org/manifests/calico-typha.yaml -o calico.yaml kubectl apply -f calico....
Anvay's user avatar
  • 13
0 votes
0 answers
160 views

keycloak: The plain HTTP request was sent to HTTPS port

I have installed a keycloak software in the default namespace but when I access the URL on the browser getting the error "The plain HTTP request was sent to HTTPS port" can anyone suggest to ...
Pradeep Kumar's user avatar
0 votes
1 answer
218 views

Kubernetes Ingress not properly routing traffic

I am trying to host a simple website using Kubernetes. I am trying to use a K8s deployment, service and an ingress to route the traffic from the external into the application running inside the pod. ...
arjunbnair's user avatar
0 votes
0 answers
120 views

How to enable Cluster Autoscaler for a cluster setup with kops

Im trying to setup a cluster autoscaler. after following docs and trying from this thread to do one , i wasn't able to create one. Created a Cluster using kops cli kops create cluster --name=pavan....
Pavan Bhat's user avatar
0 votes
1 answer
2k views

Kubelet is in running state but kubectl is giving connection to the server refused error

Kubernetes cluster was working fine earlier, Started getting issues running kubectl commands after restarting the master node (1.0.0.0). When I run kubectl get nodes command I am getting below error. ...
user avatar
0 votes
1 answer
143 views

kubectl not getting all pods

I am using Google Cloud Platform, and I have two different kubernetes clusters running on GKE. Now these clusters are zonal clusters, and are running on different zones. the issue is when I am using ...
jaafar Nasrallah's user avatar
0 votes
0 answers
881 views

kube-apiserver.service failing after complete reinstall of kubernetes and kubectl plugins

I'm having an issue where kube-apiserver.service will always fail on my local Fedora 36. Getting the namespaces from a context I was experiencing certificate issues that prevented me from succeeding. ...
WildWilyWilly's user avatar
1 vote
1 answer
273 views

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": &...
BrillCom's user avatar
  • 139
0 votes
0 answers
491 views

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. ...
Jakub's user avatar
  • 11
0 votes
0 answers
372 views

Maintaining same version of kubectl client and server version same in CentOs

Recently we upgraded the kubeadm in of kubernetes cluster. Unfortunately it happened to be both my client and server kubectl got upgraded to 2 different versions. I tried to downgrade, for some reason ...
user2262462's user avatar
-1 votes
1 answer
419 views

Sonarqube app pod is not connecting with PostgreSQL DB pod when deploying to Kubernetes

I am trying to setup SonarQube in a Kubernetes cluster. The cluster was made using KubeADM in the AWS cloud. I have the following files for the setup. Sonarqube App Deployment file Sonarqube App ...
arjunbnair's user avatar
0 votes
0 answers
54 views

Can I write a one-liner to kubectl exec -it into GKE pod via a bastion host using gcloud compute ssh?

We run our production Rails app on GKE, and we require all production access to go through a Bastion host. To access it, I SSH into the Bastion host: gcloud compute ssh --project=myproject --zone=...
JakeRobb's user avatar
  • 105
0 votes
1 answer
1k views

Fix the KubeletHasDiskPressure in Kubernetes on a very limited server

I have a question regarding our local Kubernetes installation (Kubelet version == 1.24.4). We're having a Kubernetes installation installed using Kubespray. I'm aware of a few related questions/...
Michel Gokan Khan's user avatar
1 vote
1 answer
157 views

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 ...
red888's user avatar
  • 4,151
0 votes
0 answers
95 views

kops "this cluster is not configured for dual-stack services"

Running kops version: 1.24.1, kubectl version 1.24.2 on AWS in a dual-stack enabled VPC I use the following command to create the cluster kops create cluster --cloud aws \ --vpc $...
igalsc's user avatar
  • 11
1 vote
1 answer
634 views

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 ...
arjunbnair's user avatar
0 votes
1 answer
2k views

Cannot properly edit and save worker node specs in Kubernetes

I have a Kubernetes cluster setup using KubeAdm (Setup in EC2 instances in AWS Cloud). The CNI used is Flannel and the cluster is running quite well. My requirement is that I am trying to setup ...
arjunbnair's user avatar
0 votes
1 answer
1k views

Calico Kubernetes Network Policy is denying all traffic and not working as expected

I am trying to implement some Calico based Kubernetes Network Policies. I have already setup Calico in my cluster and all the Calico based pods are running fine. In my cluster, There are two pods. 1. ...
arjunbnair's user avatar
0 votes
0 answers
290 views

Calico deployment not saving tolerance for master node

I was trying to setup a Kubernetes Cluster using Amazon EC2 and Kubeadm. I created a 't2.large' EC2 instance based on Ubuntu 18.04 AMI. Setup kubeadm, kubelet, kubectl and docker as the container ...
arjunbnair's user avatar
1 vote
0 answers
3k views

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 ...
Vakent's user avatar
  • 11
0 votes
1 answer
404 views

Can I connect to several Kubernetes clusters simultaneously - each in different terminal session?

I have 4 kubernetes clusters I need to switch between to check or monitor - sometimes I quickly need to switch back and forth between them. I see that the kubectl config context is 1 file for the user ...
Borislav T's user avatar
-1 votes
1 answer
68 views

What is the Path API for kubectl top pods

I use this command "kubectl top pods" using Kubectl command I need path api for this command I need return data from this command "kubectl top pods" via api
uday kiran's user avatar
1 vote
0 answers
338 views

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, ...
Dmitry S.'s user avatar
0 votes
1 answer
244 views

disable deprecated resource automatic conversion

I’m trying to purposefully create K8S resources with deprecated apiVersion for test purposes, but keep ending up with a converted resource to the non-deprecated apiVersion. I don’t understand why it’s ...
Nicolas Goudry's user avatar
4 votes
1 answer
2k views

Kubernetes: Pod IP address is out of range specified in --pod-network-cidr

After upgrading to v1.24.0 (after Dockershim removal), I had to install cri-dockerd, then I did the following: sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --cri-socket=unix:///var/run/cri-...
TheDHM's user avatar
  • 101
0 votes
1 answer
3k views

Kubernetes k3s master node fails to ready with FailedCreatePodSandBox errors

I'm trying to setup a small 4 worker node cluster atm and I just installed k3s on my raspberry pi 4s (8gb) and I'm getting a NotReady status. I'm new to kubernettes/k3s, but I believe with a totally ...
neogeek23's user avatar
  • 101
1 vote
0 answers
509 views

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 ...
tcurdt's user avatar
  • 413
2 votes
0 answers
5k views

Pod coredns stuck in ContainerCreating state with Weave on k8s

First of all, let me thank you for this amazing guide. I'm very new to kubernetes and having a guide like this to follow helps a lot when trying to setup my first cluster! That said, I'm having some ...
Clebson's user avatar
  • 123
2 votes
1 answer
738 views

EKS Pods with ephemeral-storage constantly evicted

I'm working on EKS v1.20.11-eks-f17b81 and I'm facing an issue with a Java container Alpine based. Basically my deployment have the limits of ephemeral-storage for the request's and also the limit's ...
user2275908's user avatar
0 votes
1 answer
189 views

Pod running kubectl trying to reach external cluster

I am using a pod (image bitnami/kubectl) in a kubernetes cluster (clusterA) but kubeconfig is set to point to another cluster (clusterB). Using on premises kubernetes 1.21.7 (on VMs) installed via ...
brgsousa's user avatar
  • 215
2 votes
4 answers
5k views

How to exec into a **node** (not container) via kubectl

How to exec into a K8s node? Up to now I only found ways to exec into containers running on a node. I would like to avoid ssh.
guettli's user avatar
  • 3,431
1 vote
3 answers
25k views

Kubernetes API server not able to register master node

I was trying to create a Kubernetes Cluster using kubeadm. I had spin up an Ubuntu 18.04 server, installed docker (made it sure that docker.service was running), installed kubeadm kubelet and kubectl. ...
arjunbnair's user avatar
1 vote
1 answer
3k views

`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 ...
abhchand's user avatar
  • 119
2 votes
0 answers
273 views

Kubernetes on Flatcar Linux will not start up kube API server after a reboot of the master node

Thank you for reading and taking your time to review this problem. I have a problem using my Kubernetes cluster. It is running Flatcar Linux, made by Kinvolk, recently acquired by Microsoft. I have ...
jonasclaes's user avatar
1 vote
1 answer
716 views

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 ...
user3852599's user avatar
7 votes
2 answers
2k views

enable ephemeral containers AWS EKS

I'm trying to debug a distroless POD by trying kubectl debug which uses ephemeral containers that are disabled by default in aws eks. I'm using aws eks 1.21 ✗ kubectl debug -it opentelemetry-...
DmitrySemenov's user avatar
2 votes
1 answer
979 views

How to load configmap from a properties file using kustomize?

I have tried using kustomize to load properties file as a configmap. For that, I created a sample set as in github link. With base files: #kustomize build base apiVersion: v1 data: config: |- ...
Sara June's user avatar
  • 431
1 vote
1 answer
475 views

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/...
Stefan's user avatar
  • 117
0 votes
1 answer
5k views

Kubernetes error "Unable to attach or mount volumes"

I deployed bitnami/wordpress helm using nginx ingress as loadbalancer like here. Everything working fine but problem is with some pods when they are created manually or automaticly by autoscaling. ...
Don Don Don's user avatar
0 votes
1 answer
203 views

How do I create an internal Layer 4 load balancer in Kubernetes?

I am trying to create an internal (no external IP) layer 4 load balancer in AWS - either a Network LB or Classic LB - for internal traffic management instead of using the kube-proxy. Below is my ...
Nova's user avatar
  • 111
2 votes
3 answers
2k views

How to delete all namespaces except the kube-system in K3s cluster

I have a K3s cluster with system pods (i.e. kube-system namespace) and my application pods: kube-system pod/calico-node-xxxx kube-system pod/calico-kube-controllers-...
solveit's user avatar
  • 265
1 vote
0 answers
388 views

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. ...
Will R's user avatar
  • 11
0 votes
2 answers
187 views

How to reinstall consul on a different namespace?

I have installed consul on default namespace using helm. helm install -f config.yaml consul hashicorp/consul --version "0.32.1" I tried uninstall of consul using helm delete consul And ...
Sara June's user avatar
  • 431