Skip to main content

☸️ Namespaces

It is advised to create the Kubernetes namespaces in advance with the following command.

plane k8s-create-namespaces
note

This step is mandatory for now as some preliminary specs need to be applied before the Helm charts.

The below picture represents the requested namespaces and their responsibilities.

Delete Namespace

In some cases, you may want to delete the complete namespace to prune all resources.

export NAMESPACE=datalayer-example
kubectl delete namespace ${NAMESPACE}
danger

If the deletion remains stuck (e.g. finalizers defined on some resources), the following snippet will force delete the namespace.

It will remove all resources and you will NOT be able to recover them, so make sure you know what you are doing!

export NAMESPACE=datalayer-example
kubectl get namespace "${NAMESPACE}" -o json \
| tr -d "\n" | sed "s/\"finalizers\": \[[^]]\+\]/\"finalizers\": []/" \
| kubectl replace --raw /api/v1/namespaces/${NAMESPACE}/finalize -f -