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
144
votes
4 answers

For a helm chart, what versions are available?

I can specify a specific version of a chart by doing: helm install --version stable/ But, how do I know which versions are available?
Job Evers
  • 4,077
  • 5
  • 20
  • 26
143
votes
11 answers

What is the difference between persistent volume (PV) and persistent volume claim (PVC) in simple terms?

What is the difference between persistent volume (PV) and persistent volume claim (PVC) in Kubernetes/ Openshift by referring to documentation? What is the difference between both in simple terms?
140
votes
2 answers

Get error "unknown field "serviceName" in io.k8s.api.networking.v1.IngressBackend" when switch from v1beta1 to v1 in Kubernetes Ingress

I had the below YAML for my Ingress and it worked (and continues to work): apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: test-ingress namespace: test-layer annotations: nginx.ingress.kubernetes.io/rewrite-target:…
Don Rhummy
  • 24,730
  • 42
  • 175
  • 330
140
votes
12 answers

How do I access the Kubernetes api from within a pod container?

I used to be able to curl https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_PORT_443_TCP_PORT/api/v1beta3/namespaces/default/ as my base URL, but in kubernetes 0.18.0 it gives me "unauthorized". The strange thing is that if I used the external IP…
tslater
  • 4,362
  • 3
  • 23
  • 27
139
votes
8 answers

no matches for kind "Deployment" in version "extensions/v1beta1"

While deploying mojaloop, Kubernetes responds with the following errors: Error: validation failed: [unable to recognize "": no matches for kind "Deployment" in version "apps/v1beta2", unable to recognize "": no matches for kind "Deployment" in…
Dan
  • 1,495
  • 2
  • 7
  • 6
138
votes
4 answers

What is the difference between a Kubernetes Controller and a Kubernetes Operator?

As I understand the purpose of the Kubernetes Controller is to make sure that current state is equal to the desired state. Nevertheless, Kubernetes Operator does the same job. The list of controller in the…
Suresh Vishnoi
  • 17,341
  • 8
  • 47
  • 55
137
votes
6 answers

Update k8s ConfigMap or Secret without deleting the existing one

I've been using K8S ConfigMap and Secret to manage our properties. My design is pretty simple, that keeps properties files in a git repo and use build server such as Thoughtworks GO to automatically deploy them to be ConfigMaps or Secrets (on choice…
James Jiang
  • 2,073
  • 6
  • 19
  • 25
136
votes
8 answers

How to gracefully remove a node from Kubernetes?

I want to scale up/down the number of machines to increase/decrease the number of nodes in my Kubernetes cluster. When I add one machine, I’m able to successfully register it with Kubernetes; therefore, a new node is created as expected. However, it…
Rafael
  • 6,339
  • 5
  • 22
  • 22
135
votes
7 answers

What is an 'endpoint' in Kubernetes?

I am new to Kubernetes and started reading through the documentation. There often the term 'endpoint' is used but the documentation lacks an explicit definition. What is an 'endpoint' in terms of Kubernetes? Where is it located? I could image the…
Chris
  • 2,071
  • 4
  • 14
  • 22
135
votes
4 answers

Difference between Docker ENTRYPOINT and Kubernetes container spec COMMAND?

Dockerfile has a parameter for ENTRYPOINT and while writing Kubernetes deployment YAML file, there is a parameter in Container spec for COMMAND. I am not able to figure out what's the difference and how each is used?
tusharfloyd
  • 1,732
  • 3
  • 14
  • 18
135
votes
30 answers

did you specify the right host or port? error on Kubernetes

I have followed the helloword tutorial on http://kubernetes.io/docs/hellonode/. When I run: kubectl run hello-node --image=gcr.io/PROJECT_ID/hello-node:v1 --port=8080 I get: The connection to the server localhost:8080 was refused - did you specify…
poiuytrez
  • 21,330
  • 35
  • 113
  • 172
135
votes
5 answers

Docker Detached Mode

What is detached mode in the docker world? I read this article Link, but it does not explain exactly what detached mode mean.
softshipper
  • 32,463
  • 51
  • 192
  • 400
133
votes
9 answers

Kubernetes equivalent of env-file in Docker

Background: Currently we're using Docker and Docker Compose for our services. We have externalized the configuration for different environments into files that define environment variables read by the application. For example a prod.env…
Johan
  • 37,479
  • 32
  • 149
  • 237
133
votes
10 answers

How to know a Pod's own IP address from inside a container in the Pod?

Kubernetes assigns an IP address for each container, but how can I acquire the IP address from a container in the Pod? I couldn't find the way from documentations. Edit: I'm going to run Aerospike cluster in Kubernetes. and the config files need its…
yanana
  • 2,241
  • 2
  • 18
  • 28
132
votes
8 answers

How to pull environment variables with Helm charts

I have my deployment.yaml file within the templates directory of Helm charts with several environment variables for the container I will be running using Helm. Now I want to be able to pull the environment variables locally from whatever machine the…
uberrebu
  • 3,597
  • 9
  • 38
  • 73