📅  最后修改于: 2022-03-11 14:50:18.696000             🧑  作者: Mango
#!/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"