-
-
Save simonswine/6bf3b665e4117f42b550c3ea12dd171a to your computer and use it in GitHub Desktop.
kubectl get rs,secrets -o json --namespace old | jq '.items[].metadata.namespace = "new"' | kubectl create-f - |
The command kubectl get secret www-snowdrop-dev-tls -n snowdrop-site -o yaml | sed 's/namespace: snowdrop-site/namespace: generator-site/' | kubectl create -n generator-site -f -
is failing
for: "STDIN": Operation cannot be fulfilled on secrets "www-snowdrop-dev-tls": the object has been modified; please apply your changes to the latest version and try again
So what is the alternative to --export ?
I wanted too make a copy all my resources running in sandbox namespace to staging namespace , Hence tired running this following cmd
kubectl get rs,secrets -o json --namespace sandbox | jq '.items[].metadata.namespace = "staging"' | kubectl create -f -
A copy of my resources gets created inside staging namespace, all the pods fails with an error:
authorization-55b866f8c4-7nkxp 0/1 CreateContainerConfigError 0 77s
consults-6b796cf5f4-wrjbf 0/1 CreateContainerConfigError 0 77s
core-api-8dd575db9-9bgth 0/1 CreateContainerConfigError 0 77s
what I am doing wrong? I just wanted to make a copy of this resources into staging namespace and play around
Export is now deprecated 😢