Delete a Redis service

If you do not need a Redis service anymore, you can delete it in the same way as you would with any other object in your cluster:

$ oc delete vshnredis.vshn.appcat.vshn.io redis-app1-prod
Non-reversible operation

If you delete the instance from the cluster, it will be deleted together with all of its data and backups!

Delete protected Redis instance

A Redis instance that is protected from deletion cannot be deleted right away. First disable deletion protection then delete the instance.

  1. Disable deletion protection:

    $ oc delete vshnredis.vshn.appcat.vshn.io redis-app1-prod
    apiVersion: vshn.appcat.vshn.io/v1
    kind: VSHNRedis
    metadata:
      name: redis-app1-prod
      namespace: prod-app
    spec:
      parameters:
        security:
          deletionProtection: false (1)
      writeConnectionSecretToRef:
        name: redis-creds
    1 Make sure the parameter is set to false
  2. Delete the instance

    $ oc delete vshnredis.vshn.appcat.vshn.io redis-app1-prod
    Non-reversible operation

    If you delete the instance from the cluster, it will be deleted together with all of its data and backups!