To change a secret, you must delete the original pod and create a new pod (perhaps with an identical PodSpec). Updating a secret follows the same workflow as deploying a new container image. You can use the kubectl rolling-update command. The resourceVersion value in a secret is not specified when it is referenced.
How do I edit my secret in Kubernetes?
The most direct (and interactive) way should be to execute kubectl edit secret <my secret> . Run kubectl get secrets if you’d like to see the list of secrets managed by Kubernetes.
How do you make OpenShift secrets?
- Create a Secret object in a YAML file on master. apiVersion: v1 kind: Secret metadata: name: mysecret type: Opaque data: username: dXNlci1uYW1l password: cGFzc3dvcmQ= …
- Use the following command to create a Secret object: $ oc create -f <filename>
- To use the secret in a pod: