OpenShift - Deleting Secrets using the oc delete secret command

If you are not familiar with the oc command, refer to OpenShift - Getting Started with the oc command.

Before you can use the oc delete secret command, you must first use the oc login command to login, and also use the oc project command to select the project that contains the secrets.

You may also want to use the oc get secrets command to display the secrets that have already been created.

oc get secrets

NAME           TYPE        DATA      AGE
mysecret1      Opaque      1         133d
mysecret2      Opaque      1         133d
mysecret3      Opaque      1         127d

 

The oc delete secret command followed by the name of a secret can be used to delete a secret.

oc delete secret mysecret1

 

If the secret is successfully deleted, the following will be displayed.

secret "mysecret1" deleted

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee

Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.





Please enter 905b0 in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |