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

33 questions
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
  • 3,335
  • 1
  • 24
  • 29
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
  • 469
  • 4
  • 15
1
vote
1 answer

Azure AKS: how to avoid resource creation in "default" namespace during cluster creation

I am trying to create a K8s cluster in Azure AKS and when cluster is ready I can see couple of resources are created within the default namespace. Example secret, configmap: As a security recommendation NO k8s resources should be created under the…
user584018
  • 10,186
  • 15
  • 74
  • 160
1
vote
1 answer

Kubernetes Egress call restrict with namespace

I have application running in K3s and want to implement network policy based on namespace only. Let's assume that currently I have three namespace A, B and C. I want to allow egress (external call to internet from pod) for namespace-A and remaining…
1
vote
1 answer

pod getting terminated because of ownerReferences pointing to resource in different namespace in kubernetes

Starting kubernetes 1.20 there has been a change regarding ownerReferences and how K8s performs GC. Basically if a resource in x namespace spins up a pod/job in a y namespace with child having ownerReferences referencing to parent resource in x, K8s…
colossal
  • 529
  • 1
  • 5
  • 22
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
vote
0 answers

kubectl run command with --dry-run=client -o yaml does not pull up namespace in the yaml files

The Kubectl run command when used with --dry-run=client and -o yaml and namespace flags does not populate the namespace field in the yaml file generated by it. Is it expected to insert the namespace manually in the yaml, do we have any other…
DBSand
  • 670
  • 3
  • 10
1
vote
1 answer

To get all pods in name spaces and in turn get image version of each pod using rest API's/client libraries

I have https://containers.cloud.ibm.com/global/swagger-global-api - Kubernetes API swagger to drill upto each clusters details till namespaces.Using IAM token to access these API’s. Further, i want to get all the pods of that specific namespace and…
0
votes
2 answers

How can I get the names of all namespaces containing the word "nginx" and store those names in an array

Basically I want to automate this task where I have some namespaces in Kubernetes I need to delete and others that I want to leave alone. These namespaces contain the word nginx. So I was thinking in order to do that I could get the output of get…
Jones
  • 5
  • 3
0
votes
1 answer

In Minkube mulitple namespaces why NetworkPolicy is not working

I'm using minikube and created the following resources Two namespaces qa and prod Created curlpod in qa namespace, also curlpod and web pod in prod namespace. Curl pods can be used to CURL any URL whereas web pod has nginx serving default web…
0
votes
1 answer

maximum number of namespaces supported by a Kubernetes cluster via k3s?

How many maximum namespaces we can create in Kubernetes cluster via k3s. I see Kubernetes Scalability thresholds here https://github.com/kubernetes/community/blob/master/sig-scalability/configs-and-limits/thresholds.md#kubernetes-thresholds, is…
0
votes
0 answers

Restricting access to namespaces based on labels

I've got a cluster with a number of already existing namespaces, and an automatization process that creates (and manages) new namespaces using Terraform. The service account used for TF got the roles with permission to all namespaces - as I believe…
0
votes
1 answer

Unable to delete Kubernetes namespace - removing finalizers fails

I've a namespace I'm unable to delete in my Kubernetes cluster. When I run kubectl get ns traefik -o yaml, I get the following: apiVersion: v1 kind: Namespace metadata: annotations: cattle.io/status:…
Nrgyzer
  • 783
  • 1
  • 14
  • 38
0
votes
1 answer

What are the differences between those two types of cluster api endpoint here?

There are two types of scope resources. Cluster scoped resources Namespace-scoped resources. I know the basic differences between those. But in the documentation they mentioned the same API endpoint for both resources. What are the differences…