Broken state
A Mesh enters the Broken phase when one or more critical steps in the installation pipeline fail in a way that prevents automatic recovery.
A "broken state" means the Mesh system cannot continue working or recover by itself due to an unrecoverable error during the installation steps. This situation requires immediate attention and may cause service interruptions.
Main causes
The most common cause is the loss or corruption of important security secrets (NATS claims secrets). These secrets are essential for the system’s security and operation. If any are missing or invalid, the Mesh cannot function correctly.
Identifying broken state
The following field values indicate that a Mesh is broken:
- Phase field:
status.atProvider.phase: Broken - Step status: One or more steps showing the
Brokenstatus - Condition:
type: Readywithstatus: "False"andreason: InstallationBroken - Error messages: Detailed error information in status.atProvider.steps[].message
Example:
Threats and consequences of the broken state
- Security risk: You may see error messages about missing or invalid secrets. The system cannot verify users or services.
- No simple recovery: Missing secrets cannot be recreated individually. The system needs the original secrets to work.
- Service impact:
- Some services may continue to run for a short time, but new changes or restarts will fail.
- No new features or updates can be applied.
- Automatic recovery from failures is not possible.
- If the system restarts, it may not start again.
- There is a risk of losing stored data.
Recovery procedures
-
Restore the missing secret (recommended)
If you have a backup of the missing secret, restore it as soon as possible. This is the fastest and safest way to recover. There will be no downtime or data loss if the original secret is restored correctly.
To restore the secret from a file, run:
shTo restore the secret from a cluster backup/snapshot, refer to your backup solution's restoration procedure.
To verify whether the secret is restored, run:
shwhere:
- {SECRET_NAME} - Name of the backup secret to restore
- {NAMESPACE} - Namespace where the secret is stored
-
Recreate the Mesh (if no backup exists)
If you cannot restore the secret, you must delete and recreate the entire Mesh system. As a result:
- The system will be unavailable during this process (usually 5–15 minutes).
- All users and applications will need new credentials.
- Some data may be lost and cannot be recovered.
To recreate the Mesh, follow these steps:
Document the current configuration:
shSave the current Mesh configuration to a file.
Delete the broken Mesh. This operation triggers a cleanup.
shWait for the cleanup to complete. To verify that it did end, run:
sh
The response should be:
Error from server (NotFound)- Recreate Mesh from the saved configuration.
Summary
A broken state is a critical issue that must be resolved quickly to avoid service disruption and data loss. Always try to restore from the backup first. If that is not possible, be prepared for downtime and additional recovery steps. Protect your system by maintaining secure backups and monitoring key resources.