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.

2646 questions
259
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,845
66
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…
36
votes
14 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 get the error You must be logged in to the server (Unauthorized) The kubernetes cluster was opperating ok and I did no changes to it... Any ideas how to…
Wojtas.Zet
  • 481
  • 1
  • 4
  • 9
32
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
  • 475
19
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 :…
15
votes
6 answers

How to list all containers in Kubernetes?

How do i list all containers in Kubernetes cluster using kubectl? Current documentation doesn't mention anything like 'container' resource. kubectl get pod -o json lists all pods which contains container descriptions. But is it possible to list…
czerny
  • 265
11
votes
2 answers

Is there a regex function for kubernetes helm templates available?

I'm trying to implement an ingress helm template encoding the current application version into the url. This shall allow users to do soft migration by providing them different versions of the…
Oliver Probst
  • 133
  • 1
  • 1
  • 7
11
votes
1 answer

Can a Kubernetes pod span nodes?

The Docs say... A pod (as in a pod of whales or pea pod) is a group of one or more containers (such as Docker containers), the shared storage for those containers, and options about how to run the containers. Pods are always co-located and…
10
votes
2 answers

Kubernetes pod /etc/resolv.conf has the wrong nameserver

I have a 4-node cluster setup at home that I am playing with, and ran into a problem when I started trying to do pod-to-pod communications. I used Kubespray to install the nodes (1 "server/controller" and 3 "nodes"). The issue is that I can't…
CodeChimp
  • 343
7
votes
1 answer

Is it possible to change the location of emptyDir volumes?

My kubernetes clusters' nodes all have small root partitions. Is it possible to configure k8s to use an alternate location for emptyDir volumes?
DjPadz
  • 71
7
votes
2 answers

Kubernetes rename cluster

New to Kubernetes. How do I rename the cluster after kubeadm init. The default cluster name is kubenetes and I want to rename it to something more meaningful. Searched all around and can not find any instructions. Thanks!
user558100
  • 73
  • 1
  • 3
6
votes
1 answer

kubectl patch: add port to deployment's pod template

I have a deployment running one pod consisting of an unique container. The deployment is currently up & running, and I want to modify its pod template to add a port to the container. Here are the currently defined ports: $ kubectl get deployment -o…
5
votes
1 answer

Kubernetes - How to debug Failed Scheduling "0 nodes are available"

I often find myself trying to spin up a new pod, only to get an error saying that no node is available. Something like: 0/9 nodes are available: 1 node(s) had no available volume zone, 8 node(s) didn't match node selector. I'm always at a loss when…
aspyct
  • 360
  • 2
  • 6
  • 21
5
votes
5 answers

Kubernetes wait on pod/job

Upon push I want to create a single kaniko build job, it currently works but after the job is finished it shows: kaniko-5jbhf 0/1 Completed 0 9m13s Yet when I run the following it just pauses indefinitely: kubectl…
Max0999
  • 223
5
votes
1 answer

what is the difference between 'metadata.labels' and 'spec.template.metadata.labels'

reading the kubernetes docs, it is not very clear to me what is the difference between specifying labels at the top-level metadata key, versus at the spec level. Consider: apiVersion: apps/v1 kind: Deployment metadata: labels: run: nginx …
nucc1
  • 198
  • 5
1
2 3
25 26