Questions tagged [kubernetes]

Kubernetes is an open source orchestration system for Docker containers. It handles scheduling onto nodes in a compute cluster and actively manages workloads to ensure that their state matches the users declared intentions. Using the concepts of "labels" and "pods", it groups the containers which make up an application into logical units for easy management and discovery.

Kubernetes is an open source orchestration system for Docker containers. It handles scheduling onto nodes in a compute cluster and actively manages workloads to ensure that their state matches the users declared intentions. Using the concepts of "labels" and "pods", it groups the containers which make up an application into logical units for easy management and discovery.

For more details, visit the official Kubernetes page.

2075 questions
233
votes
5 answers

Kubernetes stuck on ContainerCreating

A pod in my Kubernetes cluster is stuck on "ContainerCreating" after running a create. How do I see logs for this operation in order to diagnose why it is stuck? kubectl logs doesn't seem to work since the container needs to be in a non-pending…
four43
  • 2,575
  • 2
  • 14
  • 17
108
votes
7 answers

Is it possible to rerun kubernetes job?

I have the following Kubernetes Job configuration: --- apiVersion: batch/v1 kind: Job metadata: name: dbload creationTimestamp: spec: template: metadata: name: dbload spec: containers: - name: dbload image:…
Bostone
  • 1,213
  • 2
  • 9
  • 8
65
votes
4 answers

Why disable swap on kubernetes

Since Kubernetes 1.8, it seems I need to disable swap on my nodes (or set --fail-swap-on to false). I cannot find the technical reason why Kubernetes insists on the swap being disabled. Is this for performance reasons? Security reasons? Why is the…
Jeroen Jacobs
  • 1,276
  • 3
  • 15
  • 24
57
votes
5 answers

How do I tell when/if/why a container in a kubernetes cluster restarts?

I have a single node kubernetes cluster in google container engine to play around with. Twice now, a small personal website I host in it has gone offline for a couple minutes. When I view the logs of the container, I see the normal startup sequence…
Marc Hughes
  • 725
  • 1
  • 6
  • 10
30
votes
2 answers

What is spec - selector - matchLabels used for while creating a deployment?

From Kubernetes documentation: The selector field defines how the Deployment finds which Pods to manage. But, when creating deployment, I already specify the pod template as part of the deployment. So, why will I need the selectors as well? Is…
Paddy
  • 455
  • 1
  • 5
  • 8
28
votes
5 answers

Expose port 80 and 443 on Google Container Engine without load balancer

Currently I'm working on a small hobby project which I'll make open source once it's ready. This service is running on Google Container Engine. I chose GCE to avoid configuration hassle, the costs are affordable and to learn new stuff. My pods are…
27
votes
3 answers

How to mount volume with specific UID in Kubernetes Pod?

So, I'm trying to get Nexus running based off of this image in Kubernetes, but it's failing with: mkdir: cannot create directory '../sonatype-work/nexus3/log': Permission denied mkdir: cannot create directory '../sonatype-work/nexus3/tmp':…
srkiNZ84
  • 531
  • 1
  • 6
  • 10
26
votes
7 answers

Kubernetes always gives 503 Service Temporarily Unavailable with multiple TLS Ingress

I have a kubernetes cluster setup by kops on Amazon Web Services I have a 2 sites setup. One is secured via SSL/TLS/https and the other is just http. Both are Wordpress sites. Domains changed to protect site identity Ingress config: apiVersion:…
Greg Pagendam-Turner
  • 873
  • 2
  • 12
  • 19
22
votes
5 answers

Is microk8s suitable for production environments, or is it just for development?

microk8s appears to be an easy way to install Kubernetes on Ubuntu. Several places refer to it as an alternative to minikube, which is not aimed at production environments, and this post seems to indicate that it's mostly aimed at development…
Travis
  • 355
  • 1
  • 2
  • 8
22
votes
7 answers

rsync files to a kubernetes pod

I need to rsync a file tree to a specific pod in a kubernetes cluster. It seems it should be possible if only one can convince rsync that kubectl acts sort of like rsh. Something like: rsync --rsh='kubectl exec -i podname -- ' -r foo x:/tmp ...…
Bittrance
  • 2,970
  • 2
  • 21
  • 27
20
votes
6 answers

How to increase disk size in a stateful set

I'm managing an Elasticsearch deployment in Kubernetes. I see that the disk storage is getting close to full, so I would like to increase the size of the persistent volumes. I want to change this value in the Stateful…
Brent Bradburn
  • 301
  • 1
  • 2
  • 7
20
votes
4 answers

Using environment variables in Kubernetes deployment spec

I currently use a Kubernetes spec Deployment.yaml for deploying a service. The spec includes a verbatim reference to a specific IP address (marked as below): spec: type: LoadBalancer loadBalancerIP: I am…
Drux
  • 646
  • 1
  • 8
  • 23
20
votes
10 answers

kubectl get nodes error: You must be logged in to the server (Unauthorized) - how to fix

Without changes in infrastructure If I execute any kubectl command, ie: kubectl get nodes I got error You must be logged in to the server (Unauthorized) And I had working kubernetes cluster and did no changes to it... Any ideas how to debug this?…
Wojtas.Zet
  • 321
  • 1
  • 2
  • 8
18
votes
1 answer

Back-off restarting failed container - Error syncing pod in Minikube

I'm facing this error when trying to create pods. It is occurring with even very common images like Ubuntu,Alpine also. I'm fairly new to Kubernetes and using a Minikube Node ( version v0.24.1 ) Command: kubectl run ubuntu --image==ubuntu Error :…
Ram Krishnan
  • 181
  • 1
  • 1
  • 5
18
votes
4 answers

kubernetes dns resolver in nginx

I was developing locally in docker-compose, and had an nginx container doing a simple proxy_pass like so: location /app/ { proxy_pass http://webapp:3000/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; …
sharif9876
  • 281
  • 1
  • 2
  • 4
1
2 3
99 100