Questions tagged [kubernetes-namespace]

Kubernetes supports multiple virtual clusters backed by the same physical cluster. These virtual clusters are called namespaces.

Namespaces provide a scope for names. Names of resources need to be unique within a namespace, but not across namespaces. Namespaces are a way to divide cluster resources between multiple users.

Namespaces in Kubernetes Docs

22 questions
23
votes
2 answers

How to force delete a Kubernetes Namespace?

How do I force delete Namespaces stuck in Terminating? Steps to recreate: Apply this YAML apiVersion: v1 kind: Namespace metadata: name: delete-me spec: finalizers: - foregroundDeletion kubectl delete ns delete-me It is not possible to…
Will Beason
  • 2,639
  • 2
  • 19
  • 42
20
votes
1 answer

Can I connect one service account to multiple namespaces in Kubernetes?

I have couple of namespaces - assume NS1 and NS2. I have serviceaccounts created in those - sa1 in NS1 and sa2 in NS2. I have created roles and rolebindings for sa1 to do stuff within NS1 and sa2 within NS2. What I want is give sa1 certain access…
rahul
  • 2,718
  • 3
  • 24
  • 26
16
votes
1 answer

What is the "kube-node-lease" namespace for?

I know the purpose of other Kubernetes default namespaces such as: kube-system, default & kube-public, but there is no official document about the kube-node-lease. The only official explanation I've found is: Heartbeats, sent by Kubernetes nodes,…
Ivan Aracki
  • 3,668
  • 8
  • 47
  • 63
10
votes
3 answers

Keep running into "exceeded its progress dead line" despite changing progressDeadlineSeconds

I'm new AKS, ACR, and DevOps Pipelines and I'm trying to setup a CI/CD pipeline. I have a resource group setup that has both AKS and ACR in it. AKS is using Standard_B2s and only one node at this point since I'm just playing around. Images are being…
cjones
  • 5,554
  • 13
  • 43
  • 90
8
votes
3 answers

What's the maximum number of Kubernetes namespaces?

Is there a maximum number of namespaces supported by a Kubernetes cluster? My team is designing a system to run user workloads via K8s and we are considering using one namespace per user to offer logical segmentation in the cluster, but we don't…
Brannon
  • 1,074
  • 2
  • 18
  • 32
7
votes
1 answer

How to import a generated Kubernetes cluster's namespace in terraform

In my terraform config files I create a Kubernetes cluster on GKE and when created, set up a Kubernetes provider to access said cluster and perform various actions such as setting up namespaces. The problem is that some new namespaces were created…
7
votes
4 answers

How to exclude namespace from fluent-bit logging

Is there a way to exclude certain namespaces in fluent-bit? I would like to exclude certain namespaces, so that fluent-bit doesn't forward all logs created in those namespaces to ELK. Is there a way to do it besides adding annotation to each pod in…
Oren
  • 73
  • 1
  • 6
6
votes
1 answer

Priorities in Pods in Kubernetes

I have some burstable pods running in cluster, which I do not want to be killed in case of memory/cpu pressure. Is there any way to increase it's priority or something, so that we do not have to change it's namespace (kube-system for making it…
4
votes
1 answer

Kubernetes, Automatic Service fallback to another namespace

I have multiple environments represented by multiple namespaces in my kubernetes. All application has its service endpoints defined in each namespace. And we have three environments, dev, alpha, and beta. (Which is equivalent of dev, test, and…
Ysak
  • 2,073
  • 4
  • 22
  • 45
2
votes
2 answers

Delete linkerd kubernetes namespace in "terminating" status

This is the resource status: kind: Namespace api Version: v1 metadata: name: linkerd selfLink: /api/v1/namespaces/linkerd uid: e7337b2b-bddb-4344-a986-d450973bc8cf resourceVersion: '5540346' creationTimestamp: '2020-05-10T13:49:21Z' …
Alex Efimov
  • 2,664
  • 1
  • 22
  • 26
2
votes
1 answer

Difference between Kubernetes namespace and Linux namespaces?

What exactly is Kubernetes namespace and how is it different from linux namespaces (mnt,pid,net,ipc,uts,user,cgroup)?
karthik v
  • 934
  • 1
  • 12
  • 19
2
votes
2 answers

How to assign cluster, namespace and pod name in kubernetes yaml file's environment variable

I have a requirement to pass cluster, namespace and pod name to AppDynamics agent from my container deployed in Kubernetes cluster. I tried something as below, but that does not work. containers: - env: - name: JAVA_OPTS …
2
votes
1 answer

Multiple secrets on kubernetes

Best practice for managing 3 or 4 secrets for a single Kubernetes deployment. We have a deployment with some secrets repeated in all namespaces, and others that are environment specific. We are trying to decide between one secret file and changing…
TallOrderDev
  • 359
  • 3
  • 14
1
vote
1 answer

Namespace PodNodeSelector no effect on existing running pods/statefulsets

I have kubernetes cluster on bare-metal, and I want to have logical separation of nodes where DEV environment will be on less power machines while the production environment will be on most powerful machines. I implemented PodNodeSelector of…
1
vote
1 answer

Kubernetes - Create a separate namespace for each customer

I want to deploy a traditional monolithic application in Kubernetes. Thousands of customers use this application and each customer has its own instance of application. if we have 5 customers we should run 5 separate instances of this…
user5509560
1
2