Questions tagged [kubectl]

73 questions
18
votes
3 answers

How could I find the Kubernetes POD restart reasons

In have scaled my pods to 20 in my cluster and when I see the next day the few of the scaled pods were recreated. When I say POD recreated, it is getting deleted and created freshly and the timestamp of the recreated pod and the scaled pods vary. I…
Nikhil
  • 241
  • 1
  • 2
  • 7
7
votes
2 answers

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-collector-agent-6hqvf --image=busybox…
DmitrySemenov
  • 835
  • 2
  • 15
  • 27
5
votes
1 answer

Deleting all instances of resource type across multiple/all Kubernetes namespaces

I'm trying to uninstall and reinstall cert-manager on our Kubernetes clusters. Their uninstall docs mention: Before continuing, ensure that all cert-manager resources that have been created by users have been deleted. You can check for any existing…
4
votes
1 answer

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-dockerd.sock…
TheDHM
  • 101
  • 7
3
votes
1 answer

Connection to a private k8s cluster: failed to find any PEM

I have a Kubernetes cluster which is running in a private cloud. I want to run some commands from another VM but I receive this: [root@runner-tmp ~]# kubectl get pods --kubeconfig local-cluster.yaml error: tls: failed to find any PEM data in…
DobreMihaela
  • 41
  • 1
  • 6
3
votes
1 answer

What does kubectl store in the cache?

I see a cache directory in the .kube/ directory of my kubectl. I tried to find the purpose of this cache and how kubectl uses it in the kubernetes documentation here but couldn't find any clue. What does kubectl store in the .kube/cache directory?…
Akshay Hiremath
  • 167
  • 1
  • 7
2
votes
0 answers

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 issues with creating deploytments, as there are…
Clebson
  • 123
  • 2
  • 6
2
votes
1 answer

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 like this. - containerPort: 8080 protocol:…
2
votes
4 answers

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
  • 3,591
  • 17
  • 72
  • 123
2
votes
3 answers

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. The following are the steps that I did: sudo…
arjunbnair
  • 143
  • 1
  • 2
  • 11
2
votes
0 answers

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 setup the cluster using their Lokomotive (lokoctl)…
jonasclaes
  • 101
  • 7
2
votes
1 answer

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: |- dbport=1234 dcname=sfsdf dbssl=false …
Sara June
  • 451
  • 1
  • 9
  • 28
2
votes
3 answers

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-xxxxxx kube-system …
solveit
  • 265
  • 1
  • 4
  • 12
2
votes
1 answer

Double port forwarding kubernetes + docker

Summary: I have a docker container which is running kubectl port-forward, forwarding the port (5432) of a postgres service running as a k8s service to a local port (2223). In the Dockerfile, I have exposed the relevant port 2223. Then I ran the…
Chayan Ghosh
  • 123
  • 1
  • 4
1
vote
1 answer

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 the cloud shell, kubectl get pods is getting pods…
1
2 3 4 5