Questions tagged [kubernetes-pod]

Kubernetes-pod refers to Pods, the smallest deployable units of computing that can be created and managed in the cluster management software Kubernetes. Use this tag for questions related to this group of containers.

Kubernetes-pod refers to Pods, the smallest deployable units of computing that can be created and managed in the cluster management software Kubernetes. Use this tag for questions related to this group of containers.

2142 questions
7
votes
4 answers

How can I check the time taken by k8s pod to start?

I want to know the time it takes to start my pod in Kubernetes. My pod has 3 Init Containers and 9 actual Containers. Here's what I have tried so far: Approach 1: Start the pod and monitor until there are 9/9 containers running. The AGE in kubectl…
Ratish Bansal
  • 1,982
  • 1
  • 10
  • 19
7
votes
2 answers

kubectl logs of pods if it contains 2 containers

I have the pod and it has 2 containers. if i give the command "kubectl logs pod_name" it does not list logs, i need to give container name along with this command. Is there a way to display both the container logs when we give command "kubectl logs…
7
votes
1 answer

Get pods on nodes with certain label

This is an extension to the question here - how can I get the list pods running on nodes with a certain label? I am trying to find the pods in a specific zone (failure-domain.beta.kubernetes.io/zone)
vrtx54234
  • 2,196
  • 3
  • 30
  • 53
7
votes
1 answer

Are the container in a kubernetes pod part of same cgroup?

In a multi-container Kubernetes pod, are the containers part of the same cgroup (along with pod) or a separate cgroup is created for each container.
samshers
  • 1
  • 6
  • 37
  • 84
7
votes
2 answers

What's the difference between pod deletion and pod eviction?

From PodInterface the two operations Delete and Evict seems having the same effect: deleting the old Pod and creating a new Pod. If the two operations have the same effect, why do we need two API to delete a Pod and create a new one?
flyer
  • 9,280
  • 11
  • 46
  • 62
7
votes
1 answer

How does port publishing from a docker container to a kubernetes pod work?

While working through the tutorial Get Started, Part 3: Deploying to Kubernetes I stumbled over the Pod template within the deployment definition of the manifest file. There are no ports specified, neither in the pod nor in the container…
Chris
  • 2,071
  • 4
  • 14
  • 22
7
votes
2 answers

Session Affinity Settings for multiple Pods exposed by a single service

I have a setup Metallb as LB with Nginx Ingress installed on K8S cluster. I have read about session affinity and its significance but so far I do not have a clear picture. How can I create a single service exposing multiple pods of the same…
7
votes
3 answers

How to fix 'map[] does not contain declared merge key: name' error when I edit and save the pod yaml?

I 'm trying to pull an image from a private registry. But the status of pod is 'ImagePullBackOff', which means I need to add a secret to the pod. Events: Type Reason Age From …
Xiang Li
  • 71
  • 1
  • 1
  • 4
7
votes
2 answers

How to set environment variable in container from Kubernetes?

I want to set an environment variable (I'll just name it ENV_VAR_VALUE) to a container during deployment through Kubernetes. I have the following in the pod yaml configuration: ... ... spec: containers: - name: appname-service …
libzz
  • 589
  • 2
  • 10
  • 29
7
votes
4 answers

How can I retrieve the memory utilization of a pod in kubernetes via kubectl?

Inside a namespace, I have created a pod with its specs consisting of memory limit and memory requests parameters. Once up a and running, I would like to know how can I get the memory utilization of the pod in order to figure out if the memory…
Vinodh Nagarajaiah
  • 153
  • 1
  • 3
  • 6
7
votes
2 answers

Kubernetes ImagePullBackOff Errors when pulling docker images

I have an image of size of 6.5GB in the Google Container Registry. When I try to pull the image on a Kubernetes cluster node(worker node) via a deployment, an error occurs: ErrImagePull(or sometimes ImagePullBackOff). I used the describe command to…
Ajay
  • 75
  • 1
  • 1
  • 6
7
votes
1 answer

Kubernetes [RBAC]: User with access to specific Pods

I need to give access to a set of pods within a namespace to an external support. I've been reading about the RBAC API, [Cluster]Roles and [Cluster]Role Bindings; but I could not find anything about how to apply a role to a group of pods (based on…
mvazquez
  • 71
  • 1
  • 3
7
votes
1 answer

Log rotation on logs consuming disk space in Google Cloud Kubernetes pod

We have a pod in a Google Cloud Platform Kubernetes cluster writing JsonFormatted to StdOut. This is picked up by Stackdriver out of box. However, we see the disk usage of the pod just growing and growing, and we can't understand how to set a max…
6
votes
1 answer

Prometheus pod crashlooping on error "opening storage failed"

I restarted the Prometheus pod and now the Prometheus pod is crashlooping. Found this error in the logs: level=error ts=2021-06-09T09:27:29.066Z caller=main.go:758 err="opening storage failed: block dir: \"/prometheus/01F6J0P4KBBWVJD2M8B1PE7C5E\":…
6
votes
1 answer

Kubernetes how to correctly mount windows path in wsl2 backed environment

I have a local image that runs fine this way: docker run -p 8080:8080 -v C:\Users\moritz\Downloads\1\imageService\examples1:/images -v C:\Users\moritz\entwicklung\projekte\imageCluster\logs:/logs imageservice Now i want this to run as Kubernetes…
dermoritz
  • 12,519
  • 25
  • 97
  • 185