Answers for "how to see the namespaces in kubernetes"

1

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"
Posted by: Guest on July-23-2021

Code answers related to "how to see the namespaces in kubernetes"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language