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
238
votes
12 answers

Restart pods when configmap updates in Kubernetes?

How do I automatically restart Kubernetes pods and pods associated with deployments when their configmap is changed/updated? I know there's been talk about the ability to automatically restart pods when a config maps changes but to my knowledge…
Johan
  • 37,479
  • 32
  • 149
  • 237
163
votes
4 answers

how to stop/pause a pod in kubernetes

I have a MySQL pod running in my cluster. I need to temporarily pause the pod from working without deleting it, something similar to docker where the docker stop container-id cmd will stop the container not delete the container. Are there any…
AATHITH RAJENDRAN
  • 4,689
  • 8
  • 34
  • 58
155
votes
7 answers

Kubernetes sort pods by age

I can sort my Kubernetes pods by name using: kubectl get pods --sort-by=.metadata.name How can I sort them (or other resoures) by age using kubectl?
Eugene Platonov
  • 3,145
  • 3
  • 26
  • 20
86
votes
3 answers

How to configure a Kubernetes Multi-Pod Deployment

I would like to deploy an application cluster by managing my deployment via k8s Deployment object. The documentation has me extremely confused. My basic layout has the following components that scale independently: API server UI server Redis…
52
votes
7 answers

The node was low on resource: ephemeral-storage

All the pods of a node are on Evicted state due to "The node was low on resource: ephemeral-storage." portal-59978bff4d-2qkgf 0/1 Evicted 0 14m release-mgmt-74995bc7dd-nzlgq 0/1 …
Dasarathi Swain
  • 861
  • 1
  • 7
  • 16
51
votes
5 answers

Kubernetes POD delete with Pattern Match or Wildcard

When I am using below it deletes the running POD after matching the pattern from commandline: kubectl get pods -n bi-dev --no-headers=true | awk '/group-react/{print $1}' | xargs kubectl delete -n bi-dev pod However when I am using this command as…
pauldx
  • 833
  • 1
  • 12
  • 22
47
votes
4 answers

Executing multiple commands( or from a shell script) in a kubernetes pod

I'm writing a shell script which needs to login into the pod and execute a series of commands in a kubernetes pod. Below is my sample_script.sh: kubectl exec octavia-api-worker-pod-test -c octavia-api bash unset http_proxy https_proxy mv…
ahmed meraj
  • 844
  • 1
  • 9
  • 15
38
votes
2 answers

what's meaning the container_cpu_cfs_throttled_seconds_total metrics

cadvisor has two metrics container_cpu_cfs_throttled_seconds_total and container_cpu_cfs_throttled_periods_total I have confuse what does that means .. I have found about two explain: container run with cpu limit, when container cpu over limit ,…
gpl
  • 381
  • 1
  • 3
  • 5
36
votes
2 answers

Kubernetes - pod has unbound immediate PersistentVolumeClaims

I'm using mysql Kubernetes statefulset, i mapped PVs to host directory (CentOS 8 VM) but getting " pod has unbound immediate PersistentVolumeClaims" apiVersion: apps/v1 kind: StatefulSet metadata: name: mysql-container spec: serviceName: mysql …
35
votes
4 answers

Pods stuck in PodInitializing state indefinitely

I've got a k8s cronjob that consists of an init container and a one pod container. If the init container fails, the Pod in the main container never gets started, and stays in "PodInitializing" indefinitely. My intent is for the job to fail if the…
31
votes
4 answers

kubectl list / delete all completed jobs

I'm looking for a kubectl command to list / delete all completed jobs I've try: kubectl get job --field-selector status.succeeded=1 But I get: enfield selector "status.succeeded=1": field label "status.succeeded" not supported for batchv1.Jobter…
30
votes
4 answers

Kubernetes mount volume on existing directory with files inside the container

I am using k8s with version 1.11 and CephFS as storage. I am trying to mount the directory created on the CephFS in the pod. To achieve the same I have written the following volume and volume mount config in the deployment configuration Volume { …
Yudi
  • 831
  • 4
  • 10
  • 19
29
votes
6 answers

Can not delete pods in Kubernetes

I tried installing dgraph (single server) using Kubernetes. I created pod using: kubectl create -f https://raw.githubusercontent.com/dgraph-io/dgraph/master/contrib/config/kubernetes/dgraph-single.yaml Now all I need to do is to delete the created…
28
votes
6 answers

Kubernetes Pods Terminated - Exit Code 137

I need some advise on an issue I am facing with k8s 1.14 and running gitlab pipelines on it. Many jobs are throwing up exit code 137 errors and I found that it means that the container is being terminated abruptly. Cluster information: Kubernetes…
YYashwanth
  • 670
  • 1
  • 6
  • 14
26
votes
2 answers

What is the difference between Label and Selector in kubernetes?

After reading the official documentation on kubernetes.io, I am still wondering what exactly is the difference between label and selector in Kubernetes? Editing: For example consider the following Kubernetes object, what is the difference between…
Theophane Fotso
  • 313
  • 2
  • 4
  • 13
1
2 3
99 100