βΈοΈ Namespaces
It is advised to create the Kubernetes namespaces in advance with the following command.
- Plane
- Bash
plane k8s-create-namespaces
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Namespace
metadata:
name: datalayer-api
---
apiVersion: v1
kind: Namespace
metadata:
name: datalayer-storage
---
apiVersion: v1
kind: Namespace
metadata:
name: datalayer-cuda-operator
---
apiVersion: v1
kind: Namespace
metadata:
name: datalayer-jupyter
# labels:
# observer.datalayer.io/prometheus: "true"
---
apiVersion: v1
kind: Namespace
metadata:
name: datalayer-nginx
---
apiVersion: v1
kind: Namespace
metadata:
name: datalayer-openfga
---
apiVersion: v1
kind: Namespace
metadata:
name: datalayer-falco
---
apiVersion: v1
kind: Namespace
metadata:
name: datalayer-kafka
---
apiVersion: v1
kind: Namespace
metadata:
name: datalayer-pulsar
---
apiVersion: v1
kind: Namespace
metadata:
name: datalayer-router
---
apiVersion: v1
kind: Namespace
metadata:
name: datalayer-solr
---
apiVersion: v1
kind: Namespace
metadata:
name: datalayer-solr-operator
---
apiVersion: v1
kind: Namespace
metadata:
name: datalayer-system
---
apiVersion: v1
kind: Namespace
metadata:
name: datalayer-traefik
---
apiVersion: v1
kind: Namespace
metadata:
name: datalayer-vault
EOF
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. probably because of finalizers defined on some resources), the following snippet will force delete
the namespace. It will remove all resources, 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 -