Created
October 28, 2021 18:26
-
-
Save jeesmon/773393ac906c416e8447b39dcde7443b to your computer and use it in GitHub Desktop.
Copy and apply kubernetes Secret from one namespace to another
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl get secret <name> -n <namespace> -o json \ | |
| jq '.metadata.name="<new_name>"|.metadata.namespace="<new_namespace>"' \ | |
| kubectl apply -f - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment