how to know namespace is present or not in kubernetes shell script
#!/bin/bash
namespaceStatus=$(kubectl get ns nightlybuild-test -o json | jq .status.phase -r)
if [ $namespaceStatus == "Active" ]
then
echo "namespace is present"
else
echo "namespace is not present"