How to create Kubernetes Namespace if it does not Exist?
i wouldn’t go for any other solution except the following code snippet: kubernetes 1.19 and above (included) kubectl create namespace <add-namespace-here> –dry-run=client -o yaml | kubectl apply -f – kubernetes 1.18 and below (included) kubectl create namespace <add-namespace-here> –dry-run -o yaml | kubectl apply -f – it creates a namespace in dry-run and outputs it … Read more