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.

1856 questions
210
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,345
  • 2
  • 14
  • 17
100
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,133
  • 2
  • 8
  • 8
62
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,236
  • 3
  • 15
  • 24
50
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
  • 655
  • 1
  • 6
  • 10
29
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
  • 445
  • 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…
25
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
  • 511
  • 1
  • 6
  • 10
22
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
  • 763
  • 2
  • 10
  • 19
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
  • 626
  • 1
  • 8
  • 21
19
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
  • 325
  • 1
  • 2
  • 8
19
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,900
  • 2
  • 21
  • 27
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
2 answers

How to choose the external IP address of a Kubernetes load balancer in Google Kubernetes Engine

I'm deploying a web app using Google Kubernetes Engine and I want to make it accessible via a load balancer on an existing static IP address that I control as part of the same project in Google Cloud Platform, because the domain name I want to use…
17
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…
nobar
  • 271
  • 1
  • 2
  • 7
17
votes
5 answers

How to find the service principal assigned to a newly created AKS cluster?

I have just created an AKS cluster using a standard az aks create ... --ssh-key-value .... According to https://docs.microsoft.com/en-us/azure/aks/kubernetes-service-principal, an AKS cluster is created, and because an existing service principal…
JoaoCC
  • 295
  • 1
  • 3
  • 8
1
2 3
99 100