Before proceeding, ensure that you have backed up important configurations, especially when making changes to configuration files or secrets. It's also advisable to back up the Vaultwarden database to prevent potential data loss.
:::
This guide is a combination of the [upstream documentation](https://github.com/dani-garcia/vaultwarden/wiki/Enabling-admin-page#disabling-the-admin-page) and how we implemented it.
## Modify the Host Secret
To start with the deactivation, you must first modify the secret on the host's shell. Execute the following command:
The command above utilizes `kubectl`, a command-line tool for interacting with Kubernetes clusters. Here's a breakdown:
-`k3s`: This is a lightweight version of Kubernetes.
-`patch secret vaultwarden-vaultwardensecret`: This indicates that we are patching (modifying) the secret named `vaultwarden-vaultwardensecret`.
-`-n ix-vaultwarden`: This specifies the namespace (`ix-vaultwarden`) in which the secret resides.
-`--type='json'`: Specifies that the patch content is of type JSON.
-`-p='[{"op": "remove", "path": "/data/ADMIN_TOKEN"}]'`: This JSON patch instruction tells Kubernetes to remove the `ADMIN_TOKEN` field from the secret.
:::
## Update Container Config
Next, while inside the Vaultwarden container, run the command below to modify the `config.json` file: