How To Renew Vault Token LTS1 Setup

Problem

  • Unable to run the kubectl commands as the vault token was expired on the master nodes.
  • Nodelet phases getting stuck on Gen-Certs Phase
Errors in kubelet.log
Copy

While checking the directory/tmp/authbs-certs.abc/apiserver/ mentioned in the error, the file request.json had the entryPermission denied instead of the certificate information.

Affected nodes
Copy

Environment

  • Platform9 Edge Cloud v-5.3.

Solution

To recover from this issue, it is required to regenerate the vault token.

Validation

Steps to validate the token expiry:

  1. SSH into the DU VM as root user.
  2. Export the required details.
Command
Copy
  1. Run the below command to know token expiry details:
Command
Copy

Example:

Command
Copy

Procedure

The steps to regenerate the vault token are:

Perform below 1 to 7 steps as a root user in the DU VM:

1. Retrieve the affected cluster's UUID

DU VM Terminal
Copy

2. Check the current vault token for the affected cluster

DU VM Terminal
Copy

3. Set the value for the following variables to regenerate the token:

DU VM Terminal
Copy

4. Verify the values of the variables $OLD_VAULT_TOKENand $ROOT_VAULT_TOKEN

DU VM Terrminal
Copy

5. Generate new vault token using the below commands:

DU VM Terminal
Copy

6. Update the new token in the qbert database:

DU VM Terminal
Copy

7. Verify the newly generated token using:

DU VM
Copy
  1. Restart the nodeletd phases on each master nodes/affected nodes one at a time.
Phases Restart
Copy

9. Check the new token in the file /etc/pf9/kube.env

Master node
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard