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
26
votes
5 answers

Avoiding kubernetes scheduler to run all pods in single node of kubernetes cluster

I have one kubernetes cluster with 4 nodes and one master. I am trying to run 5 nginx pod in all nodes. Currently sometimes the scheduler runs all the pods in one machine and sometimes in different machine. What happens if my node goes down and all…
Prakash
  • 2,532
  • 6
  • 17
  • 21
23
votes
3 answers

Difference between Container port and targetport in Kubernetes?

How is container port different from targetports in a container in Kubernetes? Are they used interchangeably, if so why? I came across the below code snippet where containerPort is used to denote the port on a pod in Kubernetes. apiVersion:…
23
votes
2 answers

Kubernetes ReplicaFailure FailedCreate but no events

I have deployment and a replica set in Kubernetes that are failing to create a pod. I've tried kubectl describe deployment deployment-name and kubectl describe replicaset replicaset-name And they both say Conditions: Type Status …
gary69
  • 3,620
  • 6
  • 36
  • 50
20
votes
2 answers

How to login/enter in kubernetes pod

I have kubernetes pods running as shown in command "kubectl get all -A" : and same pods are shown in command "kubectl get pod -A" : I want to enter/login to any of these pod (all are in Running state). How can I do that please let me know the…
solveit
  • 869
  • 2
  • 12
  • 32
20
votes
3 answers

How to create K8S deployment in specific namespace?

I am using kubectl apply -f https://k8s.io/examples/controllers/nginx-deployment.yaml to create deployment. I want to create deployment in my namespace examplenamespace. How can I do this?
favok20149
  • 489
  • 2
  • 5
  • 6
20
votes
3 answers

Connect to other pod from a pod

Basically, i have a Deployment that creates 3 containers which scale automatically: PHP-FPM, NGINX and the container that contains the application, all set up with secrets, services and ingress. The application also share the project between PHP-FPM…
user9874638
18
votes
2 answers

How to communicate between containers in same POD in Kubernetes?

For one POD, three images has been created. The problem here is that there is no communication between containers within same pod. How should my application connected with these three containers? My pod have below containers. [dev-application…
User1984
  • 587
  • 2
  • 5
  • 14
17
votes
1 answer

How to get a heap dump from Kubernetes k8s pod?

Please provide a simple step by step guide to looking into java heap dump from a Kubernetes pod.
17
votes
4 answers

Does Kubernetes take JSON format as input file to create configmap and secret?

I have an existing configuration file in JSON format, something like below { "maxThreadCount": 10, "trackerConfigs": [{ "url": "https://example1.com/", "username": "username", "password": "password", …
user1684651
  • 390
  • 1
  • 8
  • 21
16
votes
3 answers

pod has unbound immediate PersistentVolumeClaims (repeated 3 times)

What is wrong with below. # config for es data node apiVersion: v1 kind: ConfigMap metadata: namespace: infra name: elasticsearch-data-config labels: app: elasticsearch role: data data: elasticsearch.yml: |- cluster.name:…
RIYAJ KHAN
  • 15,032
  • 5
  • 31
  • 53
15
votes
1 answer

Spring boot scheduler running cron job for each pod

Current Setup We have kubernetes cluster setup with 3 kubernetes pods which run spring boot application. We run a job every 12 hrs using spring boot scheduler to get some data and cache it.(there is queue setup but I will not go on those details as…
Darren
  • 151
  • 1
  • 1
  • 3
15
votes
2 answers

Kubernetes node Device port (USB) mapping to POD? Or Swarm service --device mapping

Is it possible to map, the device port(USB port) of a worker node, to a POD? Similar to docker create --device=/dev/ttyACM0:/dev/ttyACM0 Is it possible? I checked the refence doc, but could not find anything. In Docker service, is it possible to map…
jisan
  • 223
  • 1
  • 2
  • 6
14
votes
1 answer

K8S Pod with startupProbe and initialDelaySeconds specified waits too long to become Ready

I have been trying to debug a very odd delay in my K8S deployments. I have tracked it down to the simple reproduction below. What it appears is that if I set an initialDelaySeconds on a startup probe or leave it 0 and have a single failure, then…
Allen
  • 3,134
  • 5
  • 29
  • 49
14
votes
1 answer

Why ReadWriteOnce is working on different nodes?

Our platform which runs on K8s has different components. We need to share the storage between two of these components (comp-A and comp-B) but by mistake, we defined the PV and PVC for that as ReadWriteOnce and even when those two components were…
AVarf
  • 4,481
  • 9
  • 47
  • 74
14
votes
1 answer

State of PV/PVC after Pod is Deleted in Kubernetes

I have a Kubernetes cluster with some pods deployed (DB, Frontend, Redis). A part that I can't fully grasp is what happens to the PVC after the pod is deleted. For example, if I delete POD_A which is bound to CLAIM_A I know that CLAIM_A is not…