36 questions
58 votes
14 answers
79k views
How to create Kubernetes Namespace if it does not Exist?
It's a simple question, but I could not find a definite answer for it. Question Is it possible to create a namespace only if it doesn't exist. My objective is to create some service accounts without ...
50 votes
1 answer
45k views
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 ...
48 votes
8 answers
74k views
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 ...
29 votes
9 answers
147k views
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 ...
27 votes
2 answers
22k views
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'...
15 votes
3 answers
16k views
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 ...
11 votes
5 answers
33k views
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 ...
11 votes
2 answers
5k views
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 ...
7 votes
1 answer
3k views
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 ...
6 votes
1 answer
5k views
Is there a way to cancel namespace termination in kubernetes?
One of my namespace is in Terminating state. While there are many posts that explain how to forcefully delete such namespaces. The ultimate result is that everything in your namespace will be gone. ...
4 votes
2 answers
845 views
Sharing CrunchyData Postgres Operator Secrets Between Namespaces
I am using CrunchyData Postgres Operator to manage postgres databases on my Kubernetes cluster. This cluster will host multiple databases used by many projects. I have set up the operator and a ...
4 votes
1 answer
1k views
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 ...
3 votes
2 answers
14k views
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: ...
3 votes
2 answers
3k views
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' ...
3 votes
2 answers
3k views
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)?