<p>I created a namespace called <code>qc</code> for qc environment.</p>

<pre><code>apiVersion: v1
kind: Namespace
metadata:
  name: {{ .Values.namespace.name | quote }}
</code></pre>

<p><code>kubectl create -f namespace.yaml</code></p>

<p>But I can delete this namespace anytime by running <code>kubectl delete namespace qc</code>.</p>

<p>How can I disable to delete user created namespaces?</p>

<p>Thank you</p>

<p>You do not want disable deletion of Namespaces for your kubernetes-admin user, although it could be possible. If there are other people or services interacting with your cluster, you need to define Users and/or Service Accounts for them and bind Cluster Roles to them, whitelisting their permissions. Have a look at <a href="https://kubernetes.io/docs/admin/authentication/#users-in-kubernetes" rel="nofollow noreferrer">Users in Kubernetes</a> and <a href="https://kubernetes.io/docs/admin/authorization/rbac/" rel="nofollow noreferrer">Using RBAC Authorization</a> in the official Kubernetes Documentation.</p>
