Skip to main content

Questions tagged [kubectl]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
31 views

RKE2 error- Waiting for API server to become available Waiting to retrieve kube-proxy configuration; server is not ready

Issue 1 In the high-availability RKE2 Kubernetes cluster, I have provisioned a single load balancer (1LB) and three master nodes. Initially, all components were functioning as expected. However, ...
user24266244's user avatar
1 vote
1 answer
84 views

Kubectl specify memory for horizontal pod

I’ve seen documentation that kubectl can specify flags such as the target average CPU utilization: kubectl autoscale deployment <deployment> --cpu-percent=50 --min=1 --max=10 Why is there no ...
dejanualex's user avatar
0 votes
0 answers
29 views

Tried to set up a K8 cluster from scratch on Ubuntu 22 but the kubelet is failing to register nodes

The kubelet service shows the below error Apr 05 14:13:06 estk8worker0 kubelet[90209]: E0405 14:13:06.863258 90209 kubelet_node_status.go:92] "Unable to register node with API server" err=&...
Sks's user avatar
  • 1
0 votes
0 answers
24 views

Can't resolve service in Kubernetes

I have a pod that wants to connect to Redis, but we use dragonfly instead, but it can’t do that. [2024-04-01 14:34:28.421 DEBUG common_server/src/db/redis_manager.rs:112] creating redis pool with ...
Moonlight's user avatar
0 votes
0 answers
36 views

Kube-apiserver Unable to authenticate the requests, All workers NotReady Status

All of the workers status are NotReady. Kubelet on worker node shows below problem. Inspecting one of the workers kubelet shows below. Seems to be kubelet cannot access kube-apiserver $ curl -k ...
Nyc's user avatar
  • 1
0 votes
0 answers
23 views

PVC is in terminating state and PV is in bound state in Kubernetes

I have the PVC which is in terminating state (because it is referenced from 3 other pods) and the PV is in bound state. PV has the retain reclaiming policy. Also I am not sure on the reason for the ...
Harry's user avatar
  • 111
0 votes
1 answer
91 views

kubeProxy unable to get node ip

I currently running a k8s cluster setup where I have 3 master nodes and 3 worker nodes installed with Kubeadm. Each one of the master nodes is responsible for managing a worker node. In one of my ...
user2643892's user avatar
0 votes
0 answers
207 views

Pods getting restarted after containerd and kubelet service restarts

As part of configuration changes take place, both containerd and kubelet serivces need restart. Upon restarting services, all the pods running on the node getting restarted. I've checked the events ...
Rama's user avatar
  • 87
1 vote
2 answers
2k views

Kubeadm and kubectl - connection refused

I deployed a basic cluster on two virtual machines (kvm) with one being designated as master with control plane on it using kubeadm init - everything sees to be starting correctly, but when I try to ...
user3002166's user avatar
0 votes
0 answers
205 views

Best practice to grant only necessary permissions to Kubernetes cluster user and pods?

Even though new to kubernetes clusters, I am assigned to deploy and administrate one for my lab. For now, pods with pytorch containers using gpus (those will be the most typical kind of pods to be ...
Phynon's user avatar
  • 41
0 votes
1 answer
37 views

How to keep the .kube/config tidy after deleting a cluster?

In Microsoft Windows, I'm finding that as I create and delete AKS clusters that my .kube/config file is accumulating context entries for things that I've deleted. I've tried using the following ...
David Yates's user avatar
0 votes
0 answers
71 views

Kubernetes Template for Custom Resources

in Kubernetes there is a way to get the template of the core resources like this: kubectl create secret generic --dry-run=client --output=yaml Is there a way to do the same for Custom Resources? I ...
Henry Sachs's user avatar
0 votes
1 answer
198 views

Configure kubectl command to access remote minikube cluster on virtualbox debian VM

i have set up successfully on debian minikube with simple cluster Debian VM : umen@debian12:~$ kubectl get pods NAME READY STATUS RESTARTS AGE hello-77c947d946-jq2s4 1/1 ...
user61104's user avatar
  • 529
0 votes
0 answers
47 views

how to automate using rancher cli for updating docker image tag in deployment

We have some dev and qa k8s clusters managed using rancher. Every production release our team uses the rancher web ui to change the image tag version and update the app. We want to automate this ...
rahoolm's user avatar
  • 119
0 votes
1 answer
430 views

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's user avatar
  • 15
0 votes
1 answer
418 views

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 ...
user432024's user avatar
0 votes
0 answers
315 views

Error running PostgreSQL Deployment in Kubernetes: "No such file or directory" for data directory

I am trying to deploy a PostgreSQL database using Kubernetes and encountered an error related to the data directory. Below is my YAML configuration for the Deployment: apiVersion: apps/v1 kind: ...
Ed Black's user avatar
0 votes
1 answer
344 views

AKS Kubectl command doesn't return completed pods

I am using AKS with Kubernetes v1.25.6 and I have started to see a number of pods with a Completed status. From what I understand these are generated when an exit 0 code is returned on the process the ...
David Hirst's user avatar
1 vote
1 answer
266 views

Create Rancher API Key with kubectl

Given access to the kubernetes cluster, but no API key, how can I programatically create a API key for rancher server? The method described in documentation here requires a password login an a web ...
d_inevitable's user avatar
0 votes
1 answer
725 views

Kubernetes component status reports etcd as unhealthy

I have a 3 node kube control network setup with etcd, kube-apiserver, kube-control-manager and kube-scheduler running. When I check the status of the components it says etcd is unhealthy, but etcd ...
George's user avatar
  • 113
0 votes
2 answers
1k views

Unable to initialize Kubernetes cluster upon sudo kubeadm init line command

Trying to deploy Kubernetes on AWS EC2 instance. I'm seeing the following errors/warning when running sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --ignore-preflight-errors=all Errors: [WARNING ...
Rajesh Mappu's user avatar
0 votes
1 answer
252 views

Local Kubernetes Dns failure on one of three worker nodes

I have a problem with my Kubernetes on-premise cluster created with kubespray. I don't know why, but the dns resolutions is not working on one of my three nodes. I try to mount a debug container to ...
MelanieOL's user avatar
0 votes
1 answer
317 views

Trying to install Kubernetes in RHEL 8.5 (CRI-O) - getting error

Trying to install Kubernetes in RHEL 8.5 (CRI-O) - getting error Error: Failed to download metadata for repo 'devel_kubic_libcontainers_stable: Downloading error(s): repodata/...
Madhuri Muralidhar's user avatar
0 votes
0 answers
167 views

Frequent DiskPressure in Kubernetes Nodes

I'm currently facing an issue where one of my Kubernetes nodes keeps experiencing DiskPressure, leading to pod evictions and disruption of services. Despite our best efforts, we are struggling to ...
Ceereals's user avatar
0 votes
1 answer
2k 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
  • 33
0 votes
0 answers
690 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
1k 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 ...
Yousuf's user avatar
  • 37
0 votes
0 answers
3k 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
199 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
585 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
771 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
  • 81
0 votes
0 answers
928 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
1 answer
827 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
1 vote
1 answer
9k 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
1 vote
1 answer
499 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
2k 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
568 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
  • 149
1 vote
1 answer
962 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
  • 21
-1 votes
1 answer
859 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
1 answer
3k 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
332 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,263
1 vote
1 answer
2k 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
2k 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
470 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
5k 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
921 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
241 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
710 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
527 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