Questions tagged [kubectl]

96 questions
29
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
  • 351
8
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
  • 875
  • 2
  • 16
  • 29
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
4
votes
5 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,811
4
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
  • 43
  • 1
  • 3
  • 17
4
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…
3
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
  • 551
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…
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?…
2
votes
1 answer

Deduplicating nodes listed in `kubectl top nodes`

I've set up a new kubernetes cluster using k3s. When I run kubectl top nodes there are 6 listed even though the cluster only has 4 nodes. Some of the hosts have changed hostnames since first being set up, and both the new and old hostnames are…
slondr
  • 163
2
votes
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
  • 43
  • 1
  • 3
  • 17
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
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:…
user2275908
  • 21
  • 1
  • 2
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)…
1
2 3 4 5 6 7