Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

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"
Comment

PREVIOUS NEXT
Code Example
Shell :: apache show active sites 
Shell :: grep in gz files 
Shell :: free up ram in linux ubuntu 
Shell :: samtools sam to fastq 
Shell :: print unique lines 
Shell :: how to replace string in a json sed 
Shell :: git reset head 2 commits 
Shell :: Could not install Visual Studio Build Tools. 
Shell :: remove trash linux 
Shell :: kill server on port mac 
Shell :: powershell execution policy bypass 
Shell :: change git default branch 
Shell :: how do i know if a gem is installed 
Shell :: revert git pull 
Shell :: install bunjs 
Shell :: Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation. 
Shell :: add git submodule 
Shell :: installing kubernetes with kops 
Shell :: install terminus in ubuntu 
Shell :: install package chart.js 
Shell :: kill all process at port 
Shell :: install tensorflow anaconda 1 
Shell :: alpine sudo not found 
Shell :: vite starting code 
Shell :: look word in files command 
Shell :: shell script remove file if exists 
Shell :: install react file base64 
Shell :: pm2 remove app from list 
Shell :: reset to factory settings fortigate 
Shell :: batch remove double quotes from argument 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =