I have this json
{'kind': 'Secret', 'foo': 'secret_value'}
How can I use this json to create a secret in Kubernetes?
I want to run the equivalent of
kubectl create secret {'kind': 'Secret', 'foo': 'secret_value'}
CodePudding user response:
kubectl create secret generic secret-name --from-file=./your-file.json
or
kubectl create secret generic secret-name --from-literal=foo=secret_value
