Questions tagged [kubernetes]

KUBERNETES QUESTIONS MUST BE SPECIFICALLY RELATED TO SOFTWARE DEVELOPMENT. Configuration and deployment is off-topic here. A good rule of thumb is, if it happens outside the pod, it's probably off-topic. If it's about code running inside the pod, it's probably OK.

Kubernetes is a system for managing containerized applications across multiple hosts, providing basic mechanisms for deployment, maintenance, and scaling of applications. Its APIs are intended to serve as the foundation for an open ecosystem of tools, automation systems, and higher-level API layers. Kubernetes can run on various cloud providers, on premises in VMs, or on bare metal machines.

Getting started

Books

Online Courses

57333 questions
618
votes
31 answers

How to use local docker images with Minikube?

I have several docker images that I want to use with minikube. I don't want to first have to upload and then download the same image instead of just using the local image directly. How do I do this? Stuff I tried: 1. I tried running these commands…
Kapil Gupta
  • 7,091
  • 5
  • 16
  • 25
521
votes
25 answers

Pods stuck in Terminating status

I tried to delete a ReplicationController with 12 pods and I could see that some of the pods are stuck in Terminating status. My Kubernetes cluster consists of one control plane node and three worker nodes installed on Ubuntu virtual machines.…
Dimuthu
  • 7,946
  • 6
  • 22
  • 37
509
votes
11 answers

What's the difference between ClusterIP, NodePort and LoadBalancer service types in Kubernetes?

Question 1 - I'm reading the documentation and I'm slightly confused with the wording. It says: ClusterIP: Exposes the service on a cluster-internal IP. Choosing this value makes the service only reachable from within the cluster. This is the…
AmazingBergkamp
  • 5,708
  • 4
  • 15
  • 24
464
votes
11 answers

kubectl apply vs kubectl create?

What I understood by the documentation is that: kubectl create Creates a new k8s resource in the cluster kubectl replace Updates a resource in the live cluster kubectl apply If I want to do create + replace (Reference) My questions are Why…
Suresh Vishnoi
  • 17,341
  • 8
  • 47
  • 55
448
votes
5 answers

What's the difference between Docker Compose and Kubernetes?

While diving into Docker, Google Cloud and Kubernetes, and without clearly understanding all three of them yet, it seems to me these products are overlapping, yet they're not compatible. For example, a docker-compose.yml file needs to be re-written…
George Katsanos
  • 13,524
  • 16
  • 62
  • 98
443
votes
13 answers

Ingress vs Load Balancer

I am quite confused about the roles of Ingress and Load Balancer in Kubernetes. As far as I understand Ingress is used to map incoming traffic from the internet to the services running in the cluster. The role of load balancer is to forward traffic…
arunkjn
  • 5,631
  • 5
  • 21
  • 31
423
votes
7 answers

What's the difference between Apache's Mesos and Google's Kubernetes

What exactly is the difference between Apache's Mesos and Google's Kubernetes? I understand both are server cluster management software. Can anyone elaborate where the main differences are - when would which framework be preferred? Why would you…
binaryanomaly
  • 4,712
  • 4
  • 15
  • 22
385
votes
11 answers

What is the difference between a pod and a deployment?

I have been creating pods with type:deployment but I see that some documentation uses type:pod, more specifically the documentation for multi-container pods: apiVersion: v1 kind: Pod metadata: name: "" labels: name: "" namespace: "" …
Bjorn
  • 69,215
  • 39
  • 136
  • 164
361
votes
20 answers

Command to delete all pods in all kubernetes namespaces

Upon looking at the docs, there is an API call to delete a single pod, but is there a way to delete all pods in all namespaces?
user_mda
  • 18,148
  • 27
  • 82
  • 145
322
votes
19 answers

How do I force Kubernetes to re-pull an image?

I have the following replication controller in Kubernetes on GKE: apiVersion: v1 kind: ReplicationController metadata: name: myapp labels: app: myapp spec: replicas: 2 selector: app: myapp deployment: initial template: …
Torsten Bronger
  • 9,899
  • 7
  • 34
  • 41
306
votes
32 answers

Kubernetes service external ip pending

I am trying to deploy nginx on kubernetes, kubernetes version is v1.5.2, I have deployed nginx with 3 replica, YAML file is below, apiVersion: extensions/v1beta1 kind: Deployment metadata: name: deployment-example spec: replicas: 3 …
Pankaj Jackson
  • 3,521
  • 3
  • 15
  • 19
306
votes
1 answer

Where does the convention of using /healthz for application health checks come from?

In the Kubernetes/Docker ecosystem there is a convention of using /healthz as a health-check endpoint for applications. Where does the name 'healthz' come from, and are there any particular semantics associated with that name?
Andy Hume
  • 40,474
  • 10
  • 47
  • 58
298
votes
16 answers

Difference between targetPort and port in Kubernetes Service definition

A Kubernetes Service can have a targetPort and port in the service definition: kind: Service apiVersion: v1 metadata: name: my-service spec: selector: app: MyApp ports: - protocol: TCP port: 80 targetPort: 9376 What is the…
Mr.DevEng
  • 2,651
  • 14
  • 57
  • 115
285
votes
20 answers

How do I get logs from all pods of a Kubernetes replication controller?

Running kubectl logs shows me the stderr/stdout of one Kubernetes container. How can I get the aggregated stderr/stdout of a set of pods, preferably those created by a certain replication controller?
Torsten Bronger
  • 9,899
  • 7
  • 34
  • 41
283
votes
9 answers

How can I trigger a Kubernetes Scheduled Job manually?

I've created a Kubernetes Scheduled Job, which runs twice a day according to its schedule. However, I would like to trigger it manually for testing purposes. How can I do this?
aknuds1
  • 65,625
  • 67
  • 195
  • 317
1
2 3
99 100